Conditional Statements

Conditional Statements

He probably wants to display a badge like "staff posts" or something similar.
@Brogan is there a conditional to check if there are posts by user X inside threads ?

I guess it needs to be combined with this conditional
Code:
<xen:if is="{$contentTemplate} == 'thread_view'">
This content will show on the thread_view template
</xen:if>
There is nothing like that, and, to be efficient, you should do this on the controller side. You can still build sth like this:
HTML:
<xen:set var="$containsMessage">false</xen:set>
<xen:foreach loop="$posts" value="$post">
            <xen:if is="{$post.user_id} == X">
                <xen:set var="$containsMessage">true</xen:set>
            </xen:if>
</xen:foreach>
{$containsMessage}
where X is the user you want
 
Yea found it. Looks to be exactly the same except replace <xen> with <xf>
 
Back
Top Bottom