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.
Aug 29, 2000, 1:22 PM
Enthusiast (706 posts)
Aug 29, 2000, 1:22 PM
Post #2 of 4
Views: 2785
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
All the best
Shaun
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>
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>