Home : Products : Gossamer Links : Discussions :

Products: Gossamer Links: Discussions: Re: [rgbworld] Multiple link templates - broken images - random link: Edit Log

Here is the list of edits for this post
Re: [rgbworld] Multiple link templates - broken images - random link
I wish we rookies could delete or edit our own posts,
It sure would make this board a lot easier to solve problems.
But seems I can't edit my post, I will try to explain the solution here

All the code in my previous (super long) post... is correct, except that:

In my <%random_link%> global:
$html = Links::SiteHTML::display('link_bands', $hit);

should be:
$html = Links::SiteHTML::display('link_bands', $hit);

And my statement:
In "link_bands.html", I need to use the following:

<%if category_id == 1%>
show mp3 link and image
<%else%>
dont show it
<%endif%>

Simply was a mistake in thinking (and code). I no longer need to ask
<%if category_id == 1%> when using EITHER method of multiple
link templates.

So I can now use either:

<%loop links_loop%>
<%if category_id == 1%>
<%include link_bands.html%>
<%else%>
<%include link.html%>
<%endif%>
<%endloop%>0


OR
<%loop links_loop%>
<%link_include%>
<%endloop%>0


in category.html, depending on whether or not I "implemented multiple link templates".


It also wasn't very clear in that previous post that these were 2 different methods of
using multiple link templates. So minus all my babbling, there is some good code
in this post.

Too bad I can't clean it up :-)

Chris
RGB World, Inc. - Software &amp; Web Development.
rgbworld.com

Last edited by:

rgbworld: Mar 12, 2005, 2:15 PM

Edit Log: