XF 1.4 Header-Image different for each Forum-Node

Could you not use template conditionals
Code:
<xen:if is="{$forum.node_id} == 1">
<img src="images/node_1.jpg" alt="{$xenOptions.boardTitle}" />
<xen:elseif is="{$forum.node_id} == 2" />
<img src="images/node_2.jpg" alt="{$xenOptions.boardTitle}" />
<xen:elseif is="{$forum.node_id} == 3" />
<img src="images/node_3.jpg" alt="{$xenOptions.boardTitle}" />
<xen:else />
<img src="@headerLogoPath" alt="{$xenOptions.boardTitle}" />
</xen:if>
in the logo_block template, replacing the normal
Code:
<img src="@headerLogoPath" alt="{$xenOptions.boardTitle}" />
with a custom img src directing to the image(s) you want to use?

I haven't tried it, but it should be do-able. I'm not sure about the
Code:
<xen:hook name="header_logo">
segment, if that pulls the logo name or not.
 
Could you not use template conditionals
Code:
<xen:if is="{$forum.node_id} == 1">
<img src="images/node_1.jpg" alt="{$xenOptions.boardTitle}" />
<xen:elseif is="{$forum.node_id} == 2" />
<img src="images/node_2.jpg" alt="{$xenOptions.boardTitle}" />
<xen:elseif is="{$forum.node_id} == 3" />
<img src="images/node_3.jpg" alt="{$xenOptions.boardTitle}" />
<xen:else />
<img src="@headerLogoPath" alt="{$xenOptions.boardTitle}" />
</xen:if>
in the logo_block template, replacing the normal
Code:
<img src="@headerLogoPath" alt="{$xenOptions.boardTitle}" />
with a custom img src directing to the image(s) you want to use?

I haven't tried it, but it should be do-able. I'm not sure about the
Code:
<xen:hook name="header_logo">
segment, if that pulls the logo name or not.

Thanks for the reply. Your code is working fine, but its for the logo image. My header has

Code:
<div id="headerProxy"></div>

is there a way to change you if condition code for this header?
 
is there a way to change you if condition code for this header?
Should be able to with something similar... I'll have a look at it as soon as I get back from supper (wife is at the garage door yelling at me she's ready to go eat).
I really didn't notice it was for a header image and not the logo.

EDIT:
It looks like (and yes, she's still yelling) that you can do similar but just assign a background image via HTML code and the same img src process in the header template. Will look more when I get back.
 
Last edited:
Back
Top Bottom