Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Unable to include a different header for some categories

Quote Reply
Unable to include a different header for some categories
Hello...
Sorry! as this question maybe repeated too many times... but I could not a stright answer that works for me...
I am just trying to include a different header for different category/subcategory.

In the user templates, I added a file called new_header.html
and went to the category > modify and type it in the new header name.. but got no change in the pages (dynamic mode)... nothing happening
what is the correct syntax to add in the Header field of the category? I tried:
<%include new_header.html%>
<%include new_header%>
<%new_header%>
new_header
new_header.html
new_header.txt
....
nothing working...
thanks in advance for ur help
Mark
Quote Reply
Re: [Mark2] Unable to include a different header for some categories In reply to
In Reply To:

Any Answer!!!! anyone! thanks...
Quote Reply
Re: [Mark2] Unable to include a different header for some categories In reply to
If you want to add a file from your active template directory you should use (assuming the file exists and is in the same folder as active template)

Quote:
<%include new_header.html%> or <%include new_header.txt%>
& if you wish to add a file outside of the active template directory, try using <%include /path/to/new_header.html%> (path/to/ = path to the new_header.html on your site/server)

To add different template based on different category and sub-category, you might want to try, if/elseif/ combination based on category name.

Hope this helps.

Vishal
-------------------------------------------------------
Quote Reply
Re: [SWDevil.Com] Unable to include a different header for some categories In reply to
But that is exactly my question!! I have created a new myheader.html inside luna templates (from the admin) and included it on one of the categories (also from the admin - BROWSE/MODIFY CATEGORY) and still had no effect on the output what so ever...
I have no idea why this is happening!!!
I put <%include myheader.html%> inside the "Header" (from the admin) but nothing happens... in fact, I always have the same problem with it....
I even put the path to the file and nothing happening (<%/path/to/the/file/myheader.html%> and /path/to/the/file/<%include myheader.html%> and nothing is going on... the LINKSSQL seems to ignore the Header and Footer fields in the category no matter what I put.

I always have to create a new category234.html template and include in it its own header header234.html... which is very impractical...
any suggestion is a greatly appreciated..
thanks much
Mark

Last edited by:

Mark2: Oct 24, 2006, 7:51 AM
Quote Reply
Re: [Mark2] Unable to include a different header for some categories In reply to
In the Admin Panle>Browse>Select the Category>Edit>Header
if you created the different header here then the tag should be <%Header%>

If you created the different header in the Build>User Template> myheader.html
then you tagged it right

How you tag makes all the difference.


Sandra Roussel
Chonsa Group Design - Fresh Start Housing

Last edited by:

SandraR: Oct 25, 2006, 5:21 AM
Quote Reply
Re: [SandraR] Unable to include a different header for some categories In reply to
I thought you only need to include the new header name (<%include myheader.html%> in the "Header" field and the new header template (myheader.html) will automatically show up in the targetted template.... !!!!
Means if I created a new header template (myheader.html) using Build>User Templates ... then I went to Browse>category>Edit and put <%include myheader.html%> , then myheader.html file will show up automatically in the targetted template without even including the <%Header%> tag in the targgetted template category.html ... am I wrong or wrong!!!

Then how come I read other threads that say:
".. u just need to type the name of your new header template in the Header field..."
very confusing... am I missing something here...

thanks again..

Last edited by:

Mark2: Oct 25, 2006, 8:13 AM
Quote Reply
Re: [Mark2] Unable to include a different header for some categories In reply to
It may be a bit confusing but its what can be considered a “rule breaker”.

Normally you are very correct; you can create a new template and tag it with <%include template_name.html%>

IF:
You have ever noticed there is a completely different table for the Category properties. Since there are different properties for links and categories, then there would also be an opportunity to have different rules.

Where to view this: Database>Categories (dropdown) Go
Where to view this: Database>Links (dropdown) Go
Where to view this: Database>Users (dropdown) Go

With extensive programs such as LinksSQL, you need different rules when you are trying to accomplish very similar thing.

The particular tagging you are doing happens to be one of those rule breakers.


Hope this helps.


Sandra Roussel
Chonsa Group Design - Fresh Start Housing
Quote Reply
Re: [SandraR] Unable to include a different header for some categories In reply to
Ummmm!!! tooo much to handle... I only want to use the "Header" field to include a myheader.html without touching category.html template.

I guess I will go with my solution to manually include each header file in a template by editing the template and replacing include_header.html with my own header file and I wrote a simple code around it to recognize if there is a code in "Header" field:
something like:

Code:

<%if Header%>
<%Header%>
<%else%>
<%include include_header.html%>
<%endif%>


thanks anyway for your help..
Mark
Quote Reply
Re: [Mark2] Unable to include a different header for some categories In reply to
That is the corerct tag to use.


Sandra Roussel
Chonsa Group Design - Fresh Start Housing