Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Unkown Tag: include header.txt

Quote Reply
Unkown Tag: include header.txt
First I want to say.... great program.... well done. I have been spending about a year learning Perl and these set of programs are great learning tools as well.

Now for my problem.
I am trying to use the Resource Center Template I just downloaded. I currently use v2 of links with templates. All works fine on build but all my index.html files that are generated say... Unkown Tag: include header.txt

I looked over the discussion forum and did a search on this error message but found nothing that would lead to a resolution.

I am sure it is a simple thing... but have racked the brain all day trying to reslve this. Please point me to some explainations on this subject so I can learn a bit more about your fine program ....
Quote Reply
Re: Unkown Tag: include header.txt In reply to
Have you installed the upgrade to Template.pm that is required for the Resource Center templates to work?
Quote Reply
Re: Unkown Tag: include header.txt In reply to
No I did not install the upgrade... did not know there was one. Where might I find this little jewel... Just as I got your response I just noticed that the message was coming from Template.pm. (see my last post).

Actually let me re-define this. The current version of $Template::VERSION = '1.0'; (a cut/paste from the script). It came with my V2.0 I downloaded of Links2 V2.0... if this helps. I will look online to see if there is a newer version.

Woops! This is an edit now... I think I found what you are talking about Smile
http://www.gossamer-threads.com/scripts/resources/Detailed/26.html
Is this the mod you mean? I did not put this in yet. I will try it and see what happens. I think this should work as the mod does refer to includes...

Thanks for the quick reply. (hey don't you get a day of rest? Smile

[This message has been edited by timryan (edited June 27, 1999).]

[This message has been edited by timryan (edited June 27, 1999).]
Quote Reply
Re: Unkown Tag: include header.txt In reply to
It Works!! thanks Bobsie (and of course thanks Cal for the Template MOD)

Tim
PS. Any links to where I might find some more info on what Template does (and a few other Links Scripts) to help decrease ones Perl Learning Curve. Smile Hey, write a book Smile I bet one could sell quite a few copies of a "The Inner Workings of Links: Tips Tricks and Hacks!"
Quote Reply
Re: Unkown Tag: include header.txt In reply to
Woops... Close but no cigar!.. I got the index.html to be written (now that I included the if-mod in Template.pm) but now the header.txt and footer.txt (for the rescource templates) are not included in the index.html files. (Just for the record I use win/95 perl.) I have the header/footers in admin/header and admin/footer. But cannot think of what else to look for on this. I have had Links working but never got around to trying out the header/footer thingy... Any tips?

Tim
Quote Reply
Re: Unkown Tag: include header.txt In reply to
Are you using <%header%> and <%footer%> in the template file where you want them to display? I do not think they are in there by default.

I hope this helps.
Quote Reply
Re: Unkown Tag: include header.txt In reply to
I just put <%header%> in the home.html template to see if that worked and I put it below the <%include header.txt%> just incase the mods had to see that first. But then it hit me, would that not be redundent? What I mean is this,.. is not the purpose of the <%include header.txt%> to do just that... include my admin/header/header.txt within the home.html (etc.)?
Just for your info...
1.The home.html contains <%include header.txt%> but is not being included in home.html (or other templates)
2. I have the Template.pm "if-include mod" in place and that is being see because my tag error is not present (the Unknown Tag:include header.txt).

What else can I check? What should I have in my category.db header/footer field? I tried nothing and also header.txt but that did not make the include work.



[This message has been edited by timryan (edited June 28, 1999).]
Quote Reply
Re: Unkown Tag: include header.txt In reply to
If you're trying to include a file <%include header.txt%> based on the nested ifs mod from the resource center, then the header.txt file has to exist in the templates directory. Unless there is something weird about the Resource Center templates that contradicts that. I use the nested ifs mod for includes all over the place, and that's how it works for me.

If there's something about the resource center templates that makes this different, please correct me. Smile

Phoenix
Quote Reply
Re: Unkown Tag: include header.txt In reply to
Thanks, But that does not seem to work either. Actually I put the header.txt in both the admin/header directory and in templates directory just incase ... (to cover all angles) so that does not seem to be it. I swapped the below routine lines so the site_html became dominant in its routines and I did notice that the <%include header.txt%> works then. I tried this after your comments. Because it hit me from a prior problem that...One item I did notice in my debuging is that nph-build I have has
require "$db_lib_path/site_html_templates.pl";
require "$db_lib_path/site_html.pl";
and upon some look-see of these modules I see a big conflict of same-name subroutines.

Because I only use templates is it safe to comment out the site_html.pl to end conflict.

Anyway, this little swap experiment leads me to believe that the problem might be in the site_html_templates.pl that came with the Resource Template download (or I messup some files...) Any ideas from here.?
On what to look for in site_html_templates.pl if that is the culprit.?

Do I even have to worry about usiing the header/footer fields in category.db when using the if-include mod (<%include header.txt%> or are those fields ignored in this instance.


[This message has been edited by timryan (edited June 28, 1999).]
Quote Reply
Re: Unkown Tag: include header.txt In reply to
Help someone.. still waiting. So Far I have spent another day debugging this header.txt problem and It does work if I uncomment site_html.pl and use that module but I cannot get the Header.txt to work when I use templates site_html_templates.pl. Any tips on what I am missing here? This to me seems to narrow it down to something in site_html_templates.pl (no?$#!)

Thanks,
Tim
Quote Reply
Re: Unkown Tag: include header.txt In reply to
See the thread at http://www.gossamer-threads.com/...um3/HTML/002015.html and I think it might solve your problem.