PDA

View Full Version : Nodeid conditional template code


SiFor
01-03-2014, 12:59 AM
Im trying to add a conditional statement to the "display_Forums_item" template to display an icon next to one specific forum / node.

I have tried

<vb:if condition="$channel['nodeid'] != 70">custom code here</vb:if>
<vb:if condition="$channel['nodeid']== 70">custom code here</vb:if>
and
<vb:if condition="$GLOBALS['nodeid'] != 70">custom code here</vb:if>
<vb:if condition="$GLOBALS['nodeid'] == 70">custom code here</vb:if>

but neither seem to work, what is the correct condition code for this?

Thanks.

Lynne
01-03-2014, 03:49 AM
It looks like $forum[nodeid] may be the variable to use as it looks like $forum is registered for use there.

SiFor
01-03-2014, 08:07 AM
Thank you Lynne, that works.

How would I go about finding that out by myself or is there not a viable way to do that?

Lynne
01-03-2014, 04:27 PM
I just took a look at the template itself and looked to see what variables were being used there.