Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Next title??

Quote Reply
Next title??
I currently have on Detailed pages
<a href="<%next_url%>">NEXT ITEM</a></nav>

This faithfully creates a link to the NEXT ITEM.

Is there a way to spell out the NEXT ITEM?

For example <%next_title%> ??

As far as I can see, this doesn't workBlush

Quote Reply
Re: [iplay] Next title?? In reply to
Hi iplay,

As far as I can see only the URL is available by default.
See build_detailed in ./admin/Links/Build.pm

I suggest that you build something on your own, e.g.:

#You have to submit LinkID and CategoryID
my $cat_id = shift;
my $link_id = shift;
# Figure out the next/prev links.
my $catlnk_db = $DB->table('Links', 'CatLinks');
$catlnk_db->select_options("ORDER BY $CFG->{build_sort_order_category}") if $CFG->{build_sort_order_category};
my $sth = $catlnk_db->select('Links.ID' => { CategoryID => $cat_id }, VIEWABLE);
my ($next, $prev);
while (my $id = $sth->fetchrow) {
if ($id == $link_id) {
$next = $sth->fetchrow;
else {
$prev = $id;
my $link_db = $DB->table('Links');
my $next_link = $link_db->get($next);
Just an untested cut and paste example.
Another way would be to use the next_url in a small code if your next_url contains e.g. the LinkID.


Quote Reply
Re: [el noe] Next title?? In reply to
Many thanks el noe. I'll give that a try :)