Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Condition for First Page of Category

Quote Reply
Condition for First Page of Category
Hi-

I need to include a condition for the category page that would allow me to display some things on the first page of a category, but I don't want to display these things on any subsequent pages for that category (.e.g Page 2, Page 3, etc.).

I'd like to include a condition that would be something like the following for search results pages, but I would like it to work for category pages:

<%if nh = 1%> Display Stuff <%endif%>

When I did the dump for the available tags for the category.html template, I couldn't seem to find anything usable like the <%nh%> tag that would work for category pages. I'm probably missing something really obvious about how to do this. Does anyone know how this might be accomplished?

--Frank
Quote Reply
Re: [FrankM] Condition for First Page of Category In reply to
I finally found that I could use the <%title%> tag which

<%if title like 'Page'%> <%else%> Put Stuff Here <%endif%>

Since <%title%> includes the page title along with Page 2, Page 3, Page 4, etc. for those pages after the first one, I could use the tags above to place things on the first page of the category.

--Frank
Quote Reply
Re: [FrankM] Condition for First Page of Category In reply to
Hi,

This is something I called to Alex/GT attention, and which has come up again and again.

Paul suggested using a global that picks off $IN->{'nh'}. I have problems with that, since I do not like to trust the $IN hash, and I think an example was posted recently as to why (with multiple plugins it seemed to get confused).

Several suggestions were posted, but none seemed to be "perfect". <G> "perfect" would be for GT to have continued to pass "nh" rather than burry it in the <%span%> tag pre-parsed.

check: http://www.gossamer-threads.com/...orum.cgi?post=231297


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.