Gossamer Forum
Home : Products : Gossamer Links : Discussions :

How does the <%header%> work exactly?

Quote Reply
How does the <%header%> work exactly?
I want to include the <%header%> at the top of my category template, but I need to know how it works exactly.

Is the header field supposed to point to a template file (like in previous versions)? If so, where? Do I need to specify the location?

Right now all the field seems to do is spit out HTML code. Is that all it is good for? It seems awfully silly to store a whole bunch of HTML code in the database when a template could be used. ...or am I not doing something right...? (or is this something that hasn't been enabled yet?)

Thx, looking forward to a reply!



Rob Bartlett
AAA Internet Publishing, Inc.
http://www.AAAInternet.com
Quote Reply
Re: How does the <%header%> work exactly? In reply to
<%header%> is a field in the category record. Just as <%footer%> is.

You can have that point to a file, (Inside the category record) in which case that file is loaded and parsed, then included.

Don't confuse that with <%include header.txt%> which is just including a file in the default template directory called header.txt


PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://pugdog.com/FAQ


Quote Reply
Re: How does the <%header%> work exactly? In reply to
Thx, but is this function even working right now? Where should the header files be located and/or how do you determine where they are located? I am using 2.0.0beta1 right now. I know with previous versions there was a separate directory for headers and footers, but this does not appear to be in this distribution, is it in the latest version?

At the moment I can't use the <%header%> to do anything except spit out HTML code stored in the header field.



Rob Bartlett
AAA Internet Publishing, Inc.
http://www.AAAInternet.com
Quote Reply
Re: How does the <%header%> work exactly? In reply to
Looking at the code, the program expects header files to be in:

$CFG->{admin_root_path}/headers

and footers to be in:

$CFG->{admin_root_path}/footers

Why this is _not_ at the /templates/footers and /templates/headers, or even

/templates/default/headers and /templates/default/footers level of directories is beyond me, since I would assume that category header/footer files would be as likely to change for each template set as any other file.

Maybe this just has not caught up to the rest of the code.

PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://pugdog.com/FAQ


Quote Reply
Re: How does the <%header%> work exactly? In reply to
Kewl, thx, I will have to give that a try and see if it works. =)



Rob Bartlett
AAA Internet Publishing, Inc.
http://www.AAAInternet.com