Gossamer Forum
Home : Products : Gossamer Links : Discussions :

How Do I Change the Display Url?

Quote Reply
How Do I Change the Display Url?
How do I change the length of the url underneath the link titles? Check out my page at http://xeva.com/...th/Beauty/index.html and you will see an example of a really long url. I want to be able to shorten it.

Also, how do I get rid of the display url all together if I decide to go that route?




***************************************************************
Add your site to my directory at XEVA Links.
***************************************************************
Quote Reply
Re: [PynApple] How Do I Change the Display Url? In reply to
Nevermind, I figured it out. For those who are curious and want to do the same thing, here is how I did it:

Go to the template globals to add the following code and call it "short_url".

sub {
my $tags = shift;
if (length $tags->{URL} > 45) {
return substr($tags->{URL},0,45) . '...';
}
else {
return $tags->{URL};
}
}



Then go to the link.html template and find:

<%Links::Tools::highlight($eURL, $equery)%><%else%><%escape_html URL%>

Replace it with:

<%Links::Tools::highlight($eURL, $equery)%><%else%><%short_url URL%>

You have to "build all" because if you click on "build changes" then you won't see the changes.

If you want to delete the url under the title completely, then you have to delete:

<%if highlight%><%set equery = escape_html $query%><%set eURL = escape_html $URL%><%Links::Tools::highlight($eURL, $equery)%><%else%><%escape_html URL%><%endif%>




***************************************************************
Add your site to my directory at XEVA Links.
***************************************************************