PDA

View Full Version : Seperate Header - Here's my idea but it's not working


DougM
01-02-2005, 11:07 PM
I have seperate HTML headers for each section of my website and want one for the links directory too. So here is the idea I had:

In each links template the header is called as $header so it follows that I just replace this in each template. Right?

Now I know I could just replace $header with a big block of HTML code but I change it often enough that I don't want that many changes to make each time (I'm going to do this in vBadvanced Gallery and VB Calendar also). So I thought I could just create a new template called header_links and the replace $header with $header_links in all templates. It does not work. Nothing shows up?

Can anyone help me to solve this? I just want one header file for each section; forums, links, gallery and calendar. I don't think I'm too far off.

Thank you

Itworx4me
01-02-2005, 11:23 PM
This might help

http://www.vbadvanced.com/forum/showthread.php?t=3603

Our Sponsors
 

Brian
01-02-2005, 11:26 PM
<if condition="VBA_SCRIPT == 'links_directory'">
Links Header
<else />
Normal Header
</if>

DougM
01-03-2005, 07:17 PM
Good, this is better. I am taking it one step further to make another header for vBadvanced Gallery: <if condition="VBA_SCRIPT == 'links_directory'">
Links Header
</if>
<if condition="VBA_SCRIPT == 'gallery'">
Gallery Header
</if> Now this works fine but how do I add the <else/> to 2 conditionals so that a default header shows up for the forums? To illustrate what I mean: <if condition="VBA_SCRIPT == 'links_directory'">
Links Header
</if>
<if condition="VBA_SCRIPT == 'gallery'">
Gallery Header
</if>
<if not links or gallery>
Normal Header
</if not links or gallery>

Our Sponsors
 

Brian
01-03-2005, 07:22 PM
<if condition="!defined('VBA_SCRIPT')">

Forums Header

</if>

DougM
01-03-2005, 08:12 PM
Excellent, this works. Thank you. <if condition="!defined('VBA_SCRIPT')">
Forums Header
</if>
<if condition="VBA_SCRIPT == 'links_directory'">
Links Header
</if>
<if condition="VBA_SCRIPT == 'gallery'">
Gallery Header
</if>