Add multi prefix to...

BassMan

Member
Reactions
6
Hi Xon,

I have a problem and when you find some time I'll be glad if you can help me out.

I have this code:
Code:
<xf:if is="{$thread.Thread.prefix_id}">
    <a href="{{ link('threads', $thread.Thread) }}">{{ prefix('thread', $thread.Thread.prefix_id, 'html', '') }}</a>
</xf:if>

Now it shows only one prefix and I'd like to show multi prefixes here from your add-on. Is there an easy way how to edit above code to show it.

Thank you.

Regards,
BassMan
 
Change that too;
Code:
<xf:if is="{$thread.Thread.prefix_id}">
   <a href="{{ link('threads', $thread.Thread) }}">{{ prefix('thread', $thread.Thread, 'html', '') }}</a>
</xf:if>

This will work with and without MultiPrefix installed
 
But it will not work if I remove .prefix_id in this code:
Code:
        <xf:if is="{$thread.prefix_id}">
            <a href="{{ link('threads/', $thread) }}">{{ prefix('thread', $thread.prefix_id, 'html', '') }}</a>
        </xf:if>
 
It should be, because it works on any site with one prefix (tested on page node and forum_view). That code is within the widget.
 
MultiPrefix depends on extra content and strictly requires the type of $thread to be an entity and not an array. The XF code is much more forgiving, so can you dump the content for debugging purposes?
 
Sorry, which content exactly? When I use
Code:
{{ dump($thread) }}
in the exact same position as my code?
 
Well, if I add the dump code to the same template where the code for the prefix is I get null. But like said, it shows one prefix already.
 

Users who are viewing this thread

Back
Top