Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Link in Category name.

Quote Reply
Link in Category name.
I am trying to ad a category which is a link to a different category. IE 'Automotive/Audio' where audio would actually link to a category Home/Audio. I am not having any success. Anyone done this or got any ideas? Thanks.

Quote Reply
Re: Link in Category name. In reply to
There was a thread for Yahoo@ style category linking (not the same as the Yahoo sub-category threads) for Links 2.0, but I'm not sure if the mod ever worked properly or if it got ported to LSQL. Try searching the forums for Links 2.0, you may be able to modify the code used there.

All the best
Shaun

Quote Reply
Re: Link in Category name. In reply to
I figured out how to do it with no changes to any cgi. Add a field to the category database such as "Link_To" and put your target in there and use it in the subcategory template.

Example from Category Table.

Name Home & Family/Real Estate@

Link_TO <a href="http://www.bccomm.net/Real_Estate">Real Estate@</a>

subcategory.html template

<dl>
<dt><strong>
<%if Link_To%><%Link_To%></strong><%endif%>
<%if Link_To eq ''%>
<a class="link" href="<%URL%>"><%Short_Name%></a></strong>
<%if Description eq ''%><small> (<%Number_of_Links%>)</small>
<%if Days_Old eq '0'%><img src="<%build_root_url%>/images/new_1.gif"><%endif%>
<%if Days_Old eq '1'%><img src="<%build_root_url%>/images/new_1.gif"><%endif%>
<%if Days_Old eq '2'%><img src="<%build_root_url%>/images/new_1.gif"><%endif%>
<%if Days_Old eq '3'%><img src="<%build_root_url%>/images/new_3.gif"><%endif%>
<%if Days_Old eq '4'%><img src="<%build_root_url%>/images/new_7.gif"><%endif%>
<%if Days_Old eq '5'%><img src="<%build_root_url%>/images/new_7.gif"><%endif%>
<%if Days_Old eq '6'%><img src="<%build_root_url%>/images/new_7.gif"><%endif%>
<%if Days_Old eq '7'%><img src="<%build_root_url%>/images/new_7.gif"><%endif%>
<%endif%>
<%endif%>
</dt>
<%if Description%>
<span class="descript"><%Description%></span><%endif%>
</dl>

Quote Reply
Re: Link in Category name. In reply to
Simple ... and effective. I like it, and whilst its manually intensive and won't automatically update, it does the job beautifully! Well done lparry Smile

All the best
Shaun