Gossamer Forum
Home : Products : Gossamer Links : Discussions :

sorting links in categories using page.cgi

Quote Reply
sorting links in categories using page.cgi
I've created a template you can include in your category.html if you want to add sorting capabilities using page.cgi. I'm still not sure if I'm going to use it, but I figured I made it for some purpose Wink...

Code:

<%if sb eq "Title" or ifnot sb%>
<b>Title</b>
<%else%>
<a href="<%db_cgi_url%>/page.cgi?g=<%category_name_escaped%>;sb=Title;so=<%if so%><%so%><%endif%>">Title</a>
<%endif%>
-
<%if sb eq "Rating"%>
<b>Rating</b>
<%else%>
<a href="<%db_cgi_url%>/page.cgi?g=<%category_name_escaped%>;sb=Rating;so=<%if so%><%so%><%endif%>">Rating</a>
<%endif%>
-
<%if sb eq "Hits"%>
<b>Hits</b>
<%else%>
<a href="<%db_cgi_url%>/page.cgi?g=<%category_name_escaped%>;sb=Hits;so=<%if so%><%so%><%endif%>">Hits</a>
<%endif%>
-
<%if sb eq "Votes"%>
<b>Votes</b>
<%else%>
<a href="<%db_cgi_url%>/page.cgi?g=<%category_name_escaped%>;sb=Votes;so=<%if so%><%so%><%endif%>">Votes</a>
<%endif%>
- (
<%if so eq "asc" or ifnot so%>
<b>Ascending</b>
<%else%>
<a href="<%db_cgi_url%>/page.cgi?g=<%category_name_escaped%>;so=asc;sb=<%if sb%><%sb%><%endif%>">Ascending</a>
<%endif%>
-
<%if so eq "desc"%>
<b>Descending</b>
<%else%>
<a href="<%db_cgi_url%>/page.cgi?g=<%category_name_escaped%>;so=desc;sb=<%if sb%><%sb%><%endif%>">Descending</a>
<%endif%>
)


Hope someone has a jolly great time with this...

yeah boy!

- Jonathan