Gossamer Forum
Home : Products : Gossamer Links : Discussions :

<%title_linked%> on review_search_results.html

Quote Reply
<%title_linked%> on review_search_results.html
Heya,

For some reason the <%title_linked%> tag seems to be unavailable on the review_search_results.html template. Oddly enough I have not problems using it in review_add.html. Has anyone else seen this? Any suggestions or fixes that I'm not aware of?

Safe swoops
Sangiro
Quote Reply
Re: [sangiro] <%title_linked%> on review_search_results.html In reply to
Still looking for some help on this.... any takers?

Safe swoops
Sangiro
Quote Reply
Re: [sangiro] <%title_linked%> on review_search_results.html In reply to
Try including

<%GT::Template::dump%>

on the bottom of the review_search_results.html template to see what tags are available on this page.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] <%title_linked%> on review_search_results.html In reply to
Yup - did that and <%title_linked%> is not available. This is weird seeing as this is the tag used to create the navigation breadcrumbs. Any way I can load all the tags available for another template (i.e. category.html) into this template?

Safe swoops
Sangiro
Quote Reply
Re: [sangiro] <%title_linked%> on review_search_results.html In reply to
You can use something like

<%Links::Build::build_title_linked('Review')%>

in your template, I guess.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] <%title_linked%> on review_search_results.html In reply to
Got the followinf error message on including that:

Code:
Error: Unable to load module: Links::Build. Reason:
Error: No subroutine 'Links::Build::build_title_linked' in 'Links/Build.pm',
Error: No subroutine 'Links::Build::build_title_linked' in 'Links.pm'

Safe swoops
Sangiro
Quote Reply
Re: [sangiro] <%title_linked%> on review_search_results.html In reply to
Sorry for this. Try

<%Links::Build::build('title_linked','Review')%>

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] <%title_linked%> on review_search_results.html In reply to
Hey Ivan,

We seem to be making progress... this gives you the following:

Home : Review

That's a link to the home page and reviews. All the categories and sub-categories of in which the link sits that was reviewed is still missing. I would expect something like this:

Home : Category : Sub Category : Link : Review

Any thoughts?

Safe swoops
Sangiro
Quote Reply
Re: [sangiro] <%title_linked%> on review_search_results.html In reply to
To get the whole thing is not so easy, because one tag you would need (category name) is not available on the template.

You would need to either write a global that gets the category name of the current link, or to write a little plugin that just defines the title_linked tag for you on the review search results page in the way you want it.

It's not difficult, but I don't have time now. Sorry.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [sangiro] <%title_linked%> on review_search_results.html In reply to
OK, here is a global that will do just what you want. Name it review_title_linked, and call it on your review pages as

<%review_title_linked($ID, 'Reviews')%>


Code:
sub {

my $link_id = shift;
my $title_comment = shift;

my $link_db = $DB->table('Links');

my $link = $link_db->select({ ID => $link_id })->fetchrow_hashref;
my ($cat_id, $cat_name) = each %{$link_db->get_categories ($link->{ID})};
my $title = Links::Build::build ('title_linked', { name => "$cat_name",
home => 1,
complete => 1 });

$title .= qq~ : <a href ="$CFG->{build_detail_url}/$link->{ID}$CFG->{build_extension}">$link->{Title}</a> : ~;
$title .= $title_comment;

return $title;

}

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] <%title_linked%> on review_search_results.html In reply to
Ivan,

Beautiful! Thank you - that's exactly what I wanted. Hope GT fixes this in the next release anyway.

Safe swoops
Sangiro