Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Problem with Lastly Added Links Global Sub.

Quote Reply
Problem with Lastly Added Links Global Sub.
Hi All,

I'm using a Global Sub to display the 5 lastly added links to my home.html template. This sub uses a different template other than links.html. Actually, I use a template called links1.html so I can have a little bit of a different look on home.html. On links1.html I want to display the Title, Description and directory location of the link. Currently, I use a Global called newlinks to run this sub:




sub {
# Displays the newest links on the home page.
my ($output,$sth,$link);
my $search_db = $DB->table('Links');
$search_db->select_options ('ORDER BY Add_Date DESC Limit 5');
$sth = $search_db->select ( { isNew => 'Yes', isValidated => 'Yes' });
while ($link = $sth->fetchrow_hashref) {
$output .= Links::SiteHTML::display ('link1', $link);
}
return $output;
}





and I post a tag on my home.html called <%newlink%> to display the links1.html template. Currently, this sub works, it will display everything I want. But, for some reason the Title of lastly listed links display but when you mouse over them it does not show a valid URL. Also, the directory location of the lastly listed link only displays: Unknown Tag: 'title_linked'

I'm using the same tags that are in links.html. For the title and URL I'm using:


<a href="<%detailed_url%>" class="newbluebold"><%Title%></a>

but I this is what shows up on home.html: /Unknown Tag: 'detailed_url'


Does anyone know why <%detailed_url%> and <%title_linked%> tags are coming up Unknown.

Thank you in advance,

Eddie
Quote Reply
Re: [eddie123] Problem with Lastly Added Links Global Sub. In reply to
The detailed error is probably down to you having 'build_detailed' turned off in Setup > Build. Not sure about the first problem though, sorry Frown

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Problem with Lastly Added Links Global Sub. In reply to
Hi Andy,

I wish that was the quick fix. No, I have Build Detailed turned on. You can take a look if you could. Our site is http://www.cgi-bin.com

Thank you in advance,

Eddie
Quote Reply
Re: [eddie123] Problem with Lastly Added Links Global Sub. In reply to
http://www.gossamer-threads.com/...i?post=241022#241022