Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Category header field

Quote Reply
Category header field
Please forgive me if this is a stupid question or has been addressed before. I have searched and can't find an answer.

When customizing the Category "Header" field can I use a Template Global code or can a regular <%include navbar.txt%> code be used or is the header field for html code only? See this post/thread for more information about what I've been trying to do: Subject: Re: Header Customization

Thanks in advance.
Nadine
Quote Reply
Re: [Westiegirl] Category header field In reply to
You can use either method although if you only need html output use an include - if you want to include something perl generated use a global
Quote Reply
Re: [PaulWilson] Category header field In reply to
Thanks Paul. I tried both of these. Can you tell me neither worked? I explained what I did in posts to the other thread. I don't understand what I did wrong.

Thanks again.
Quote Reply
Re: [Westiegirl] Category header field In reply to
Hi,

No, you can not use any <% ... %> tags inside the Header and Footer fields in the database. One option would be to use the Category_Template field and give that category a different template (say category2.html) and put your special tags. Or, if there are only a few categories, you can do:

<%if Name eq 'SomeCategory'%>
custom code here.
<%endif%>

Hope that helps,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Category header field In reply to
Thanks, Alex. Your reply confirmed what I suspected.

Nadine
Quote Reply
Re: [Alex] Category header field In reply to
Ugh, sorry, I misread the question and thought Westiegirl was asking for ways to create headers/footers and not the content inside them.

Always thought I needed glasses.
Quote Reply
Re: [Alex] Category header field In reply to
In Reply To:
Hi,

No, you can not use any <% ... %> tags inside the Header and Footer fields in the database. One option would be to use the Category_Template field and give that category a different template (say category2.html) and put your special tags. Or, if there are only a few categories, you can do:

<%if Name eq 'SomeCategory'%>
custom code here.
<%endif%>

Hope that helps,

Alex

----------------------------

Hi Alex,

I tried using

Code:
<%if Name eq 'SomeCategory'%>
custom code here.
<%endif%>
for showing "Popular, New and Top Links" in second level category - like hot scripts does in ASP, PERL, PHP........ but with no success.

I use above code with popularbycat global you mentioend. I was wondering if you can help me out.

Here is another post for similer request
http://www.gossamer-threads.com/perl/gforum/gforum.cgi?post=198348

Thanks.

Vishal
-------------------------------------------------------
Quote Reply
Re: [Alex] Category header field In reply to
Code:
<%if Name eq 'SomeCategory'%>
custom code here.
<%endif%>

How would you do this with the PHP version?

Thanks,
david