Gossamer Forum
Home : Products : Links 2.0 : Customization :

category.html:

Quote Reply
category.html:
I too work on category templates, and have, thanks to Bobsie's instructions, got them working. But I have a problem: I want to customise the way links are presented, and just can't figure out what to do ...

It must be the <%links%> part I want to change. That calls, I suppose, link.html.
So, I created a link2.html and try calling <%links2%>, but that doesn't seem to work.

Any advice? Thanks.

John

[This message has been edited by gotze (edited May 23, 1999).]
Quote Reply
Re: category.html: In reply to
The <%link%> variable does not call link.html as you said. It is used in link.html based on the code contained in sub site_html_link of site_html_templates.pl. Various script subroutines (most notably, nph-build.cgi and search.cgi) call sub site_html_link to format the link. So, if you want to modify the look of a link, you edit sub site_html_link. The <%link%> variable in the template file will then display the link based on the format you specified.

Caveat: Be careful doing that because it will impact the links displayed on the New, Cool, and Search Results pages, not just the links displayed on the category pages.

I hope this helps.
Quote Reply
Re: category.html: In reply to
Thanks Bobsie,

I wasn't clear in my post, I now see. What I want to do is to have two different ways of presenting the links, depending on which category they're in.

Would I need to create, say, a new sub site_html_link2 and call that all the places where sub site_html_link is called?
Quote Reply
Re: category.html: In reply to
Yes, that is what you would need to do. You would have to modify the calls in nph-build.cgi, sub build_category_pages to use either sub site_html_link or sub site_html_link2 based on the category you were processing. I would continue to use just site_html_link for the other pages though (New, Cool, Search results, etc.).

Look for the code that begins with:

Quote:
# If we are spanning pages, we grab the first x number of links and build
# the main index page. We set $numlinks to the remaining links, and we remove
# the links from the list.

[This message has been edited by Bobsie (edited May 24, 1999).]