Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Title & URL for Prev & Next Link (in Detailed.html)

Quote Reply
Title & URL for Prev & Next Link (in Detailed.html)
I am using Laura's Global as below:

Code:
sub {
my $args=shift;
my $db = $DB->table ('Category','CatLinks');
my ($cat_id,$full_name) = $db->select ( { 'CatLinks.LinkID' => $args->{ID} }, ['Category.ID', 'Category.Name'] )->fetchrow_array;
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 ( { CategoryID => $cat_id, isValidated => 'Yes' }, [ 'Links.ID' ,'Links.Title'] );
my ($next,$prev,$next_title,$prev_title) ;
while (my ($id,$title) = $sth->fetchrow_array) {
if ($id == $args->{ID}) {
($next,$next_title) = $sth->fetchrow_array;
last;
} else {
$prev = $id;
$prev_title=$title;
}
}
my ($next_url, $prev_url);
if ($next) {
$next_url = qq~<a href="$CFG->{db_cgi_url}/page.cgi?g=Detailed/$next.html&d=1">$next_title</a>~;
}
if ($prev) {
$prev_url = qq~<a href="$CFG->{db_cgi_url}/page.cgi?g=Detailed/$prev.html&d=1">$prev_title</a>~;
}
return {next_url => $next_url, prev_url => $prev_url};
}

Global Source: https://www.gossamer-threads.com/forum/Products_C9/Gossamer_Links_C5/Development%2C_Plugins_and_Globals_F20/Re%3A_%5Bafinlr%5D_Next_Prev_-_Title_P270913/?search_string=prev%20title#p270913



& the code to output the info/value as below:

<%get_next%>

<%if next_url%> next_url = <%next_url%><br> <%endif%>
<%if prev_url%>prev_url = <%prev_url%><br> <%endif%>


It seems to work just fine, however the problem is with the URL for Prev & Next Link.

Is there any way to display Static URL for Prev & Next Links on Detailed page, instead of the dynamic URL that is being shown using the above global.

Thank you.

Vishal
-------------------------------------------------------
Subject Author Views Date
Thread Title & URL for Prev & Next Link (in Detailed.html) VishalT 6538 Mar 12, 2020, 5:36 PM
Thread Re: [VishalT] Title & URL for Prev & Next Link (in Detailed.html)
VishalT 6466 Mar 12, 2020, 5:41 PM
Thread Re: [VishalT] Title & URL for Prev & Next Link (in Detailed.html)
Andy 6321 Mar 14, 2020, 2:39 AM
Thread Re: [Andy] Title & URL for Prev & Next Link (in Detailed.html)
VishalT 6310 Mar 14, 2020, 3:59 AM
Post Re: [VishalT] Title & URL for Prev & Next Link (in Detailed.html)
VishalT 6306 Mar 14, 2020, 4:08 AM
Thread Re: [VishalT] Title & URL for Prev & Next Link (in Detailed.html)
Andy 6306 Mar 14, 2020, 4:51 AM
Thread Re: [Andy] Title & URL for Prev & Next Link (in Detailed.html)
VishalT 6295 Mar 14, 2020, 5:02 AM
Thread Re: [VishalT] Title & URL for Prev & Next Link (in Detailed.html)
Andy 6290 Mar 14, 2020, 6:00 AM
Thread Re: [Andy] Title & URL for Prev & Next Link (in Detailed.html)
VishalT 6273 Mar 14, 2020, 11:21 AM
Thread Re: [VishalT] Title & URL for Prev & Next Link (in Detailed.html)
Andy 6146 Mar 16, 2020, 12:12 AM
Post Re: [Andy] Title & URL for Prev & Next Link (in Detailed.html)
VishalT 6134 Mar 16, 2020, 1:04 AM