pjfry
Active member
Hi
I have a little Problem with an conditional. I hab a look at Brogans FAQ (Thanks for that!) and found this one:
This is exactly what I need. So I tried this for my Logo to change depending in which category the visitors are. This is my code in the logo_block template:
But it do not work. I tried to change the logo for a specific forum with this code:
And that worked. So is there a XenForo Problem with the category conditional or do I miss something?
Thanks for help!
Benny
I have a little Problem with an conditional. I hab a look at Brogans FAQ (Thanks for that!) and found this one:
Code:
How can I show content in a specific category?
<xen:if is="{$category.node_id} == x">
This content will show in category x
</xen:if>
Note that in order for this to work, you must have categories set as pages in the ACP -> Options -> Node & Forum List: Create Pages for Categories.
This is exactly what I need. So I tried this for my Logo to change depending in which category the visitors are. This is my code in the logo_block template:
HTML:
<xen:if is="{$category.node_id} == 54">
<div id="logo"><a href="/categories/world-of-warcraft.54/">
<span><xen:comment>This span fixes IE vertical positioning</xen:comment></span>
<img src="/styles/onlinegilde/wow_logo.png" alt="{$xenOptions.boardTitle}" />
</a></div>
<xen:elseif is="{$category.node_id} == 39" />
<div id="logo"><a href="/categories/world-of-warcraft.54/">
<span><xen:comment>This span fixes IE vertical positioning</xen:comment></span>
<img src="/styles/onlinegilde/d3_logo.png" alt="{$xenOptions.boardTitle}" />
</a></div>
<xen:else />
<div id="logo"><a href="{$logoLink}">
<span><xen:comment>This span fixes IE vertical positioning</xen:comment></span>
<img src="@headerLogoPath" alt="{$xenOptions.boardTitle}" />
</a></div>
But it do not work. I tried to change the logo for a specific forum with this code:
HTML:
<xen:if is="{$forum.node_id} == 26">
<div id="logo"><a href="/categories/world-of-warcraft.54/">
<span><xen:comment>This span fixes IE vertical positioning</xen:comment></span>
<img src="/styles/onlinegilde/wow_logo.png" alt="{$xenOptions.boardTitle}" />
</a></div>
<xen:else />
<div id="logo"><a href="{$logoLink}">
<span><xen:comment>This span fixes IE vertical positioning</xen:comment></span>
<img src="@headerLogoPath" alt="{$xenOptions.boardTitle}" />
</a></div>
And that worked. So is there a XenForo Problem with the category conditional or do I miss something?
Thanks for help!
Benny