Different header per forum?

The easiest way of doing it would be:
Code:
<xen:if is="{$quickNavSelected} == node-1">
<img src="link/to/logo" alt="{$xenOptions.boardTitle}" />
<xen:elseif is="{$quickNavSelected} == node-2">
<img src="link/to/logo" alt="{$xenOptions.boardTitle}" />
</xen:if>

// etc etc etc

You could somehow manipulate a foreach to make it easier:
Code:
<xen:foreach loop="{$quickNavSelected}" value="{$logo}">
<img src="link-to-logos-directory/{$logo}" alt="{$xenOptions.boardTitle}" />
</xen:foreach>
This would require all your headers to be in one directory named after each node, and for each node to require a different header.
 
Do you want a different header for each forum, or for most forums? I'm asking because of sub-forms, and the header that should be displayed when a visitor is not in any forum.

Here is the approach I would take:

1. Style Properties: Header and Navigation -> Settings -> Header Logo Image Path:
set to: Styles/your_nifty_style_dir_your_logos_are_located_in
do not add the "/" at the end.

2. Open Template -> logo_block

Change this:
Code:
                <img src="@headerLogoPath" alt="{$xenOptions.boardTitle}" />

to this:

Code:
<xen:if is="in_array({$quickNavSelected}, array(5,6,19,22,198,4567))">
<img src="@headerLogoPath/logo{$quickNavSelected}.png" alt="{$xenOptions.boardTitle}" />
<xen:else />
<img src="@headerLogoPath/logo.png" alt="{$xenOptions.boardTitle}" />
</xen:if>

Change the numbers in the array(5,6,19,.....) to the forum_ids you want to have a different logo for.

Make a logo for each node_id. And name each one like so: logo5.png, logo6.png, etc.

The else statement will ensure a logo is displayed in all areas that do not have a node_id, or in forums you did not want a specific header to show.
 
Thanks to you guys.

Yes, I will probably have a different header in most forums.

I will try both approaches and see what works for me. I will let you know. Really appreciate it :)
 
Do you want a different header for each forum, or for most forums? I'm asking because of sub-forms, and the header that should be displayed when a visitor is not in any forum.

Here is the approach I would take:

1. Style Properties: Header and Navigation -> Settings -> Header Logo Image Path:
set to: Styles/your_nifty_style_dir_your_logos_are_located_in
do not add the "/" at the end.

2. Open Template -> logo_block

Change this:
Code:
                <img src="@headerLogoPath" alt="{$xenOptions.boardTitle}" />

to this:

Code:
<xen:if is="in_array({$quickNavSelected}, array(5,6,19,22,198,4567))">
<img src="@headerLogoPath/logo{$quickNavSelected}.png" alt="{$xenOptions.boardTitle}" />
<xen:else />
<img src="@headerLogoPath/logo.png" alt="{$xenOptions.boardTitle}" />
</xen:if>

Change the numbers in the array(5,6,19,.....) to the forum_ids you want to have a different logo for.

Make a logo for each node_id. And name each one like so: logo5.png, logo6.png, etc.

The else statement will ensure a logo is displayed in all areas that do not have a node_id, or in forums you did not want a specific header to show.

Quick question: How do I find the forum id for each forum?

EDIT: I think I have found it. In the admin node tree area I right clicked on the forum I want to ID for.

It said:

http://mysite.com/admin.php?nodes/moderators-forum.9/edit

Can I assume the forum ID is 9?
 
Do you want a different header for each forum, or for most forums? I'm asking because of sub-forms, and the header that should be displayed when a visitor is not in any forum.

Lawrence: Thank you for the help so far. I believe I am close, but cannot find what I am doing wrong. I want a different logo in my football forum than is in the other forums.

Here is what I have done:

In style properties>header and navagation I have the Header Logo Image Path set to styles/graphics

The graphic I want to show up on the football board (ID #3) is in public_html>styles>graphics and is named syracuse_helmets.jpg

You can view the graphic at http://syracusefan.com/styles/graphics/syracuse_helmets.jpg if you'd like

This is what I have in the logo_block section of the Logo_Block template

<div id="logoBlock">
<div class="pageWidth">
<div class="pageContent">
<xen:include template="ad_header" />
<xen:hook name="header_logo">
<div id="logo"><a href="{$logoLink}">
<span><xen:comment>This span fixes IE vertical positioning</xen:comment></span>
<xen:if is="in_array({$quickNavSelected}, array(3))">
<img src="@headerLogoPath/logo{$quickNavSelected}.png" alt="{$xenOptions.boardTitle}" />
<xen:else />
<img src="@/syracuse_helmets.jpg" alt="{$xenOptions.boardTitle}" />
</xen:if>
</a></div>
</xen:hook>
<span class="helper"></span>

<xen:if is="{$adData.logo}">
<xen:include template="xenams_logo" />
</xen:if>

</div>
</div>
</div>

This is not working. My guess is I have something wrong in the following line:

<img src="@/syracuse_helmets.jpg" alt="{$xenOptions.boardTitle}" />

Any idea how I can get this working?

Is this enough info?
 
ignore everything they told you. then go read this post and it will work for you.
instead of mucking up your logo template just put your template call there. put all your helmet code into the new template, and enter the helmet.png urls in your extra.css
 
Top Bottom