Gossamer Forum
Home : Products : Links 2.0 : Customization :

different link.html

Quote Reply
different link.html
Hi, is it possible to use a different link.html for different categories?

Quote Reply
Re: different link.html In reply to
Check out the URL below. Further down the thread you'll find some info you might find useful. It is also very useful to search the forum. Wink

http://www.gossamer-threads.com/...ew=&sb=&vc=1

Thomas
http://www.japanreference.com
Quote Reply
Re: different link.html In reply to
Thats what I am after, cheers

Quote Reply
Re: different link.html In reply to
Ok I have search the forums for this question as well, anyway is it possible to have added, ratings etc within the description of the link itself?

Quote Reply
Re: different link.html In reply to
Even if you use different copies of link.html you can of course display the same values as in the original link file. Just read the thread I have posted, I think it is quite well explained.

Thomas
http://www.japanreference.com
Quote Reply
Re: different link.html In reply to
What about multiple link.html in search results I tried what Eliot said but still get the same link.html, some of my catagories I dont want a Unordered list, and some dont have a web site. Thanks

Quote Reply
Re: different link.html In reply to
Uh...you most likely have NOT used the EXACT codes I posted or you have not uploaded the edited search.cgi and site_html_templates.pl files properly.

Trust me...the codes I posted DO work! Tongue

Regards,

Eliot Lee
Quote Reply
Re: different link.html In reply to
Yes you code works, but I have already inserted the code that gosup said for using multiple links.html, so can I have different links.html for different catagories in search results?

So what I have got is

sub site_html_link {
# --------------------------------------------------------
# This routine is used to display what a link should look
# like.
# Set the appropriate template file to load
if ($category_name =~ "Backpacker_Hostels") {
$template_link = "link1.html"; }
elsif ($category_name =~ "Backpacker_hostels/Auckland") {
$template_link = "link2.html"; }
#all other categories use standard link template
else { $template_link = "link.html"; }




my %rec = @_;

# Set new and pop to either 1 or 0 for templates.
($rec{'isNew'} eq 'Yes') ? ($rec{'isNew'} = 1) : (delete $rec{'isNew'});
($rec{'isPopular'} eq 'Yes') ? ($rec{'isPopular'} = 1) : (delete $rec{'isPopular'});

return &load_template ( $template_link, {
detailed_url => "$db_detailed_url/$rec{'ID'}$build_extension",
%rec,
%globals
});
}

sub site_html_search_link {
# --------------------------------------------------------
# This routine is used to display what a link should look
# like.
# Set the appropriate template file to load
if ($category_name =~ "Backpacker_Hostels") {
$template_link = "link1.html"; }
elsif ($category_name =~ "Backpacker_hostels/Auckland") {
$template_link = "link2.html"; }
#all other categories use standard link template
else { $template_link = "searchlink.html"; }
my %rec = @_;

# Set new and pop to either 1 or 0 for templates.
($rec{'isNew'} eq 'Yes') ? ($rec{'isNew'} = 1) : (delete $rec{'isNew'});
($rec{'isPopular'} eq 'Yes') ? ($rec{'isPopular'} = 1) : (delete $rec{'isPopular'});

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

but this doesnt work all the search results are using the same i.e searchlink.html






Quote Reply
Re: different link.html In reply to
You did NOT use all the codes I recommended....

LOOK at the following codes you have:

Code:

return &load_template ('searchlink.html', {


HINT: See the bolded codes!

You need to use $template_link NOT searchlink.html.

Got it? Wink

Regards,

Eliot Lee
Quote Reply
Re: different link.html In reply to
no :-( I changed to that but still using the same for each catagory, either one or the other but not both types displayed for example
http://www.backpack-newzealand.com/Backpacker_Hostels/
then do a search for it
Quote Reply
Re: different link.html In reply to
I did...and guess what?

The SAME LAYOUT APPEARED IN BOTH THE CATEGORY page AND the SEARCH RESULT PAGE, THUS the CODES _are working!

Regards,

Eliot Lee
Quote Reply
Re: different link.html In reply to
It appears that It works but it is because I added a </ul> just before the table in the description, but it is using the same link.html as other catagories when a search is performed - (Added: 24-Jan-2001 Hits: 0 Rating: 0 Votes: 0) Rate It still appear.

Quote Reply
Re: different link.html In reply to
In Reply To:
but it is using the same link.html as other catagories when a search is performed
By the looks of the codes you've provided so far, that is exactly what it should be doing.

Regards,

Eliot Lee
Quote Reply
Re: different link.html In reply to
Oh what codes should I use for displaying different link.html for different catagories in a search? I have just installed the Enhanced Template and was thinking I could use "if" codes but am not sure how I could do this.. like if there is a url then the <ul> tag is inplace if not no <ul> if hits the hits are displayed if not etc... would this work?

Quote Reply
Re: different link.html In reply to
Uh...the codes you are using ALREADY do that! I feel like we ae talking in circles...

good luck!

Regards,

Eliot Lee
Quote Reply
Re: different link.html In reply to
They should but for some reason thay are not, anyway I have found away around this by using if statements in link.html one more question though is it possible to add <%Title%> , <%URL%> etc in the description of a site

Quote Reply
Re: different link.html In reply to
If you mean a "detailed" version of the link, then you can add any FIELD tag from the links.def in the detailed.html file.

If you mean inserting tags within tags, then NO.

Regards,

Eliot Lee