Gossamer Forum
Home : Products : Links 2.0 : Customization :

Template Modifications

Quote Reply
Template Modifications
Alex,

I am still pretty much a beginner. I downloaded the links 2.0 and installed it an gave it check and everything seems to work very well. I wanted to edit the templates to get a page design similar to my previous one.
I have only edited the home.html template but there is just a couple of problems. Where new categories are created the new image is now just "new" text and I can't seem to bring it up to the same line as the category title either. The page can be viewed at: http://www.1st-artsandcrafts.com/linkspages also I don't want to go any further right now because I'm not positive that this is the best way or if there is a better way for me to achieve this.

Please Help

Sincerely
Keith
Quote Reply
Re: Template Modifications In reply to
Keith,

The "New" and "Cool" setups are done in the links.html template... Its really simple to change it to any look you want there..

Neil
http://www.studentpilot.com

------------------
Quote Reply
Re: Template Modifications In reply to
I prefer to edit "site_html.pl" Smile

------------------
-[ It's just another night; good morning Webmasters! ]-
Quote Reply
Re: Template Modifications In reply to
The category appearance is not controlled by a template. Look for sub site_html_print_cat at the very bottom of site_html_templates.pl (in your linksadmin directory). I suggest you make a copy of the script to work with so you have a backup just in case something goes wrong. Also, be sure you edit this file with a plain text editor(i.e. Windows Notepad) and not with an HTML editor.

Look the script over carefully because the HTML is broken up by some of the CGI script. Be VERY careful not to change any of the script itself, and do NOT alter any of the variables that begin with a $ (like $category_name).

As for the "new" text, I'm not quite sure what you mean by "bring it up to the same line" (are you referring to the fact that it's superscript?) but it's also in this file. If you want to use an image instead of text, replace the following with your image link:

Quote:
<small><sup class="new"> new </sup></small>


To change the "new" and "pop" that appear next to actual links, you have to change the link.html template. You can replace the new and pop text with an image here. Note that the <%if...%> and <%endif%> statements must have lines all to themselves. When you're done, it should look something like:

Quote:
<%if isNew%>
<img src="yourNEWimagereference">
<%endif%>

<%if isPopular%>
<img src="yourPOPULARimagereference">
<%endif%>

Hope that covers it for ya!

Quote Reply
Re: Template Modifications In reply to
I still suggest to use 'site_html.pl' Smile
And if it's the case, the here's the mod to show images:

if ($rec{'isNew'} eq "Yes") { $output .= qq~ <a href="/New/"><img border=0 alt="New" src="/new.gif"></a>~; }
if ($rec{'isPopular'} eq "Yes") { $output .= qq~ <a href="/Cool/"><img border=0 alt="Cool" src="/cool.gif"></a>~; }


It will show the images 'New' & 'Cool', and it will also have a link to /New/ & /Cool/ directories. Smile

Regards,

Pasha
http://find.virtualave.net

------------------
-[ It's just another night; good morning Webmasters! ]-
Quote Reply
Re: Template Modifications In reply to
Thanks Brad and Pasha,

I edited the site_html_templates.pl and it worked out great. Easy too. Thanks for your help.

Do either of you know how to select a link for a Bolded title or priority placement in the category listings? I looked at the upgrade.pl and upgrade_beta.pl but I was left confused with those instructions.

Sincerely

Keith

BTW Check out the site at:
www.1st-artsandcrafts.com

------------------
www.1st-artsandcrafts.com