Gossamer Forum
Home : Products : Links 2.0 : Customization :

Re: Review.cgi: converting a LinkID to an actual title...

Quote Reply
Re: Review.cgi: converting a LinkID to an actual title... In reply to
I know there must be a better way but here is what I have.

in site_html_template add
Code:
sub html_link_listing {
# --------------------------------------------------------
# This routine is used to display what a link listing should look
# like.

my %rec = @_;

return &load_template ('linklisting.html', {
detailed_url => "$build_detail_url/$rec{'ID'}$build_extension",
%rec,
%globals
});
}

make a template for you title. (can include any of the resource's info, just title or linked title) If you want to include the new and pop images, you'd have to add some code above. Just look at sub site_html_link

then slap this in the cgi where you need the title

Code:
print &html_link_listing (&get_record($ID));
replacing the $ID with whatever variable you have for the ID num.

or $ResourceTitle = &html_link_listing (&get_record($ID));

try it and see if it will work for you. the cgi where you add this code will wave to require


require "/path/to/links.cfg";
require "$db_lib_path/db_utils.pl";
require "$db_lib_path/links.def";
require "$db_lib_path/site_html_templates.pl";


If you come up with something cleaner which just changes id # to title, I'd like the snippet of code
Thanx


------------------
http://bartour.hypermart.net
Subject Author Views Date
Thread Review.cgi: converting a LinkID to an actual title... oldmoney 3368 Dec 28, 1999, 9:06 AM
Post Re: Review.cgi: converting a LinkID to an actual title...
Mutt 3406 Dec 28, 1999, 10:39 AM
Post Re: Review.cgi: converting a LinkID to an actual title...
oldmoney 3413 Dec 28, 1999, 10:43 AM
Thread Re: Review.cgi: converting a LinkID to an actual title...
oldmoney 3409 Dec 28, 1999, 6:34 PM
Thread Re: Review.cgi: converting a LinkID to an actual title...
sdyson 3305 Sep 9, 2000, 3:58 AM
Thread Re: Review.cgi: converting a LinkID to an actual title...
sdyson 3311 Sep 10, 2000, 7:17 AM
Thread Re: Review.cgi: converting a LinkID to an actual title...
oldmoney 3293 Sep 10, 2000, 7:32 PM
Post Re: Review.cgi: converting a LinkID to an actual title...
sdyson 3296 Sep 11, 2000, 6:07 AM
Post Re: Review.cgi: converting a LinkID to an actual title...
Mutt 3396 Dec 29, 1999, 12:13 PM
Post Re: Review.cgi: converting a LinkID to an actual title...
widgetz 3412 Dec 29, 1999, 1:04 PM
Post Re: Review.cgi: converting a LinkID to an actual title...
Mutt 3411 Dec 29, 1999, 2:49 PM
Post Re: Review.cgi: converting a LinkID to an actual title...
stefang 3431 Dec 29, 1999, 3:04 PM
Post Re: Review.cgi: converting a LinkID to an actual title...
Mutt 3312 Dec 29, 1999, 10:03 PM
Post Re: Review.cgi: converting a LinkID to an actual title...
widgetz 3315 Dec 29, 1999, 10:08 PM