Gossamer Forum
Home : Products : Links 2.0 : Customization :

need conditional link to detailed page in link.html template based on category

Quote Reply
need conditional link to detailed page in link.html template based on category
I want to have detailed pages for most of my categories, but for some categories I do not want to have detailed pages because there simply isn't more information to place on the detailed pages for links in those categories.

Can someone teach me how to have a link to the detailed pages based on the category?

So links in Category1 would have

website_url / detailed information
description

while Category2 would have simply

website url
description

and no link to the detailed page? (I don't mind the extra detailed pages being built since there aren't that many of them, but I need to find a way to conditionally include the link to the detailed pages to be able to exclude it from links contained in 6 or 7 specific categories - I don't want people clicking on the detail page for categories where there won't be any useful information on those pages and they would be better off going straight to the web sites)

Any help would be very much appreciated.
Quote Reply
Re: [Jeff-C] need conditional link to detailed page in link.html template based on category In reply to
Two options: one is to add a field which would have a yes/no or on/off switch in the admin to display the detailed link. These two posts should help with that:

http://www.gossamer-threads.com/...g=isDetailed;#117388

http://www.gossamer-threads.com/...cgi?post=29725#29725

Option two is to use two different templates, one with the detailed link, one w/o:

http://www.bobsgoodstufflists.net/mtemplates_mod.html


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] need conditional link to detailed page in link.html template based on category In reply to
Thanks Leonard!

The second option works prefectly by simply using the Multiple Category Templates mod for link.html so most categories use link.html but the few that I don't want to link to detailed pages use link2.html. Very easy and works like a charm.

Thanks again!

Jeff.