Gossamer Forum
Home : Products : Gossamer Links : Discussions :

detailed_url on detailed pages?

Quote Reply
detailed_url on detailed pages?
Hi,

I like to include "detailed_url" on detailed pages, but the tag doesn't work.
My detailed pages look like
Code:
http://www.portugal-links.de/portugalseiten/Algarve/Essen_und_Trinken/Letzte_Bratwurst_vor_Amerika_4.html

any ideas?

Kai
___________________________________________
http://www.westalgarve.de
http://www.portugalforum.org
http://www.portugal-links.de
Quote Reply
Re: [kailew] detailed_url on detailed pages? In reply to
Install this template global, name is something like "get_detail_url"

Code:
sub {
my $id = shift;
my $tags = Links::SiteHTML::tags(link => { ID => $id });

return { detailed_url => $tags->{detailed_url} };
}

Then in your template, use

Code:
<%get_detail_url($ID)%>

To load the detailed_url tag into memory. then you can use

Code:
<%detailed_url%>

Philip
------------------
Limecat is not pleased.
Quote Reply
Re: [fuzzy logic] detailed_url on detailed pages? In reply to
Hi,

thx ... but with

Code:
<%get_detail_url($ID)%>

I get the URL with the ID-number ... but I don't use numbers to build my detailed URLs. I use the titles ...

Kai
___________________________________________
http://www.westalgarve.de
http://www.portugalforum.org
http://www.portugal-links.de
Quote Reply
Re: [kailew] detailed_url on detailed pages? In reply to
Hm...

How about:

Code:
sub {
my ($id, $title) = @_;
$title =~ s/[^\w\d]/_/g;
my $cat = $DB->table([qw/Category CatLinks/])->select("Full_Name", { LinkID => $id })->fetchrow();
my $dir = $DB->table("Category")->as_url($cat);
return { detailed_url => "$CFG->{build_detail_url}/$dir/$title" . "_" . $id };
}

<%get_detail_url($ID, $Title)%>

Philip
------------------
Limecat is not pleased.
Quote Reply
Re: [fuzzy logic] detailed_url on detailed pages? In reply to
this produces an error:

Code:
GT::SQL (5758): File '/kunden/portugalinks.de/
portugal_links_sql/public_html/cgi-bin/admin/defs/lsql_ARRAY(0x89ba28c).def' does not exist or the permissions are set incorrectly at (eval 42) line 4.

Please enable debugging in setup for more details.
___________________________________________
http://www.westalgarve.de
http://www.portugalforum.org
http://www.portugal-links.de
Quote Reply
Re: [kailew] detailed_url on detailed pages? In reply to
Code:
sub {
my ($id, $title) = @_;
$title =~ s/[^\w\d]/_/g;
my $cat = $DB->table(qw/Category CatLinks/)->select("Full_Name", { LinkID => $id })->fetchrow();
my $dir = $DB->table("Category")->as_url($cat);
return { detailed_url => "$CFG->{build_root_url}/$dir/$title" . "_" . $id . $CFG->{build_extension} };
}

How about now?

Philip
------------------
Limecat is not pleased.
Quote Reply
Re: [fuzzy logic] detailed_url on detailed pages? In reply to
sorry, no result
___________________________________________
http://www.westalgarve.de
http://www.portugalforum.org
http://www.portugal-links.de
Quote Reply
Re: [kailew] detailed_url on detailed pages? In reply to
If your trying to print the url that you are AT at the moment, just use this:

Code:

sub {

return $CFG->{build_root_url} . $ENV{REQUEST_URI};
}


Nevermind, I'm so used to dynamic mode I am forgetting things.

- Jonathan

Last edited by:

jdgamble: Sep 28, 2006, 5:28 PM
Quote Reply
Re: [jdgamble] detailed_url on detailed pages? In reply to
Hi,

thx, but I don't like to print the URL of the moment but like to print the static URL in detailed pages. Because: I like to use the URL for social bookmarking ... and therefore it should be the static URL ...

Kai
___________________________________________
http://www.westalgarve.de
http://www.portugalforum.org
http://www.portugal-links.de