Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Show Link on all Spanned Pages

Quote Reply
Show Link on all Spanned Pages
I currently have an IsFeatured column in my Links table. Currently I have things set up so that isFeatured DESC is the first sort criterion. I then have category.html show Featured Links under a "Featured Links" heading if the link is Featured. So what happens is that all Featured Links in a category are forced to the first page of a category, and then the rest of the links (non-featured) show under and on spanned pages.

Is there a way that I can have the Featured Links show up on all spanned pages? This is my main desire. Secondly, is there a way to have the Featured Links also show up as regular links? If I could do this, I wouldn't need to use IsFeatured as the sort order (essentially a workaround so all Featured Links show on the first page).

Here is what I have in category.html:

Code:

<%if links_loop.length~%>
<h3>Featured Links <span class="small_txt_black">(<a href="http://www.WiredBIZ.com/advertising.html">Feature My Link</a>)</span></h3>
<%loop links_loop~%>
<%if ExpiryDate != 2147483647 or isFeatured eq 'Yes'%>
<%include link.html%>
<%endif%>
<%~endloop%>


And here is the regular loop:

Code:
<%if links_loop.length~%>
<%set header_printed = ""%>
<%loop links_loop~%>
<%if ExpiryDate = 2147483647 and isFeatured eq 'No'%>
<%unless header_printed%>
<h3>Links</h3>
<%if paging.num_hits%><div class="paging" align="right"><%Links::Utils::paging()%></div><%endif%>
<%set header_printed = 1%>
<%endif%>
<%include link.html%>
<%endif%>
<%~endloop%>
<%if paging.num_hits%><div class="paging" align="right"><%Links::Utils::paging(button_id => 'paging_button2')%></div><%endif%>
<%~endif%>


Now I realize that if I remove the "<%if ExpiryDate = 2147483647 and isFeatured eq 'No'%>" command from the regular call, it will show all links again. However, they will be shown in the sort order, as opposed to alphabetically, becuase I have had to force the sort of Featured Links to ensure they are first.
Subject Author Views Date
Thread Show Link on all Spanned Pages Jobu 2271 Jul 23, 2006, 9:48 AM
Thread Re: [Jobu] Show Link on all Spanned Pages
brewt 2187 Jul 23, 2006, 12:16 PM
Post Re: [brewt] Show Link on all Spanned Pages
Jobu 2187 Jul 23, 2006, 12:18 PM