Gossamer Forum
Home : Products : Gossamer Links : Discussions :

How to show Category Name on Detail Page ?

Quote Reply
How to show Category Name on Detail Page ?
Hello all,

How to show Category Name on Detail Page ? Please help...
Quote Reply
Re: [reenee] How to show Category Name on Detail Page ? In reply to
HI,

Have you got the <%title%> or <%title_linked%> name in the detailed.html template?

Cheers,

Dat

Programming and creating plugins and templates
Blog
Quote Reply
Re: [tandat] How to show Category Name on Detail Page ? In reply to
Thanks tandat,

Yes, its true ..i can use <%title%> if i build the Detail by using Static page, but the problem is, i'm using detail_page.cgi plugin and its not detect the <%title%> and the error message is unknown tag: title

Please help ...
Quote Reply
Re: [reenee] How to show Category Name on Detail Page ? In reply to
Hello ..

Anybody ? I'm using detail_page.cgi to display my detailed page, i keep trying with some code like <%category_clean%> and <%title_linked%> at my detailed.html, but still no luck...

Please help ...
Quote Reply
Re: [reenee] How to show Category Name on Detail Page ? In reply to
which version of detail_page.cgi are you using? <%title_linked%> should return the linked category.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] How to show Category Name on Detail Page ? In reply to
I just checked http://girlfriends.com and you can see on the detail pages the linked title that is returned by "<%title_linked%>


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] How to show Category Name on Detail Page ? In reply to
Thanks PugDog,

Yes, <%title_linked%> its work and i'm using detail_page.cgi for Links SQL 2.1.0, is it possible to show a category name at detail page by using detail_page.cgi ?

Please help ..
Quote Reply
Re: [reenee] How to show Category Name on Detail Page ? In reply to
I'm not sure what you are asking.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] How to show Category Name on Detail Page ? In reply to
In Reply To:
I'm not sure what you are asking.


I'm sure what is being asked is how to use the tag <%title%> in pages created by detail_page.cgi as is used when the detailed pages are statically built:

<title><%site_title%> :: <%title%> :: Detail</title>

In the example above, <%title%> is a tag available on the static detail pages - it returns an Unknown Tag error on pages built with detail_page.cgi.

On an additional note: <%if prev_url%><a href="<%prev_url%>">Previous</a><%endif%> and it's counterpart "Next" do not build links to the prev/next pages using detail_page.cgi.

Any suggestions for fixes to either?

Detailed_Page 2.1.0
LSQL 2.1.2
Quote Reply
Re: [Karen] How to show Category Name on Detail Page ? In reply to
Global called nextprev

sub {
my $args=shift;
#my $cat_id = $IN->param('catID');
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' ] );
my ($next, $prev);
while (my ($id) = $sth->fetchrow_array) {
if ($id == $args->{ID}) {
($next) = $sth->fetchrow_array;
last;
}
else {
$prev = $id;
}
}
my ($next_url, $prev_url);
if ($next) {
$next_url = "$CFG->{db_cgi_url}/detail_page.cgi?ID=$next";;
}
if ($prev) {
$prev_url = "$CFG->{db_cgi_url}/detail_page.cgi?ID=$prev";;
}
return {next_url => $next_url, prev_url => $prev_url};
}

You need to put <%nextprev%> at the top of your detail page (somewhere before you need the tag <%next_url%>).

Last edited by:

afinlr: Jan 28, 2004, 8:16 AM