Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Where is header read from?

Quote Reply
Where is header read from?
I would like to use a header.txt and footer.txt file from outside of my templates directory. I took a quick look through the files and couldn't see where the <%include header.txt%> tag is parsed from. What I need to do is have Links read the header.txt anf footer.txt file from a different location... thus I need to know where this happens to change the path.

Any help is appreciated!

Quote Reply
Re: Where is header read from? In reply to
Template.pm

Code:

# Parse includes, do this first so that the includes can include
# template tags.
$temp =~ s#$begin\s*include\s*(.+?)\s*$end#


Didn't we already go through this before??? Wink

Regards,

Eliot Lee

Quote Reply
Re: Where is header read from? In reply to
Hi Eliot,

Sorry for the redundant post if I missed it. Now, if I wanted to put the header.txt file in, say, /home/sites/test/header.txt, but only this template wold reside outside of the templates dir, how would I do this?

That is,

if (header.txt)
read from a different location (/home/sites/test/header.txt) and print

Thanks!

Quote Reply
Re: Where is header read from? In reply to
So, what was the problem with the include codes I gave you before??!?!?! I thought that it worked after changing the subroutine name.

I don't understand your problem...the codes I provided you before do work and it would be problematic to change the template parse codes for only one file.

Regards,

Eliot Lee

Quote Reply
Re: Where is header read from? In reply to
I'm sorry, I don't understand. You never gave me codes before, and I have changed no names of subroutines. This is the first time that I have brought this subject up in the forum.

All I want to do is print a header file which resides in a diferent location than the rest of my templates. Sicn I am using the same header file throughout my site, I'd rather only have one header so that I can change it once and be done.

Thanks for the help.

Quote Reply
Re: Where is header read from? In reply to
Read the following Thread:

http://www.gossamer-threads.com/...25&Old=allpostsp

And it would be great if you tried to search the forum before posting questions. Smile

Regards,

Eliot