Gossamer Forum
Home : Products : DBMan : Customization :

URLs and clickable Link Names

Quote Reply
URLs and clickable Link Names
I'm not so familiar with scriptsand the forum search is not workig for me, so here is my newbie question.
Is it possible to create a name for an URL so the search results don't show the URL, but the clickable name?
I'd like to create a field with the name of the URL and one with the URL (per record) and want to connect them somehow to prevent the output of the sometimes very long URLs.

Thanx in advance, Peter.
Quote Reply
Re: URLs and clickable Link Names In reply to
At the top html_record under the line which reads:

# Below is where you define your form.

add:

$url{'Email'} = $rec{'Email'};
$url{'Email'} =~ s/<\/?B>//g;
$url{'URL'} = $rec{'URL'};
$url{'URL'} =~ s/<\/?B>//g;

of course matching the field name with yours Smile

Then in html_record, where you want the link to display use:

<a href="$rec{'URL'}">add whatever you want to display here </a>

Say if you wanted your field 'WebSite' to be what displays in the above line you would use:

<a href="$rec{'URL'}">$rec{'WebSite'}</a>

<a href="mailto:$rec{'Email'}">$rec{'Email'}</a>

Hope this helps Smile
Quote Reply
Re: URLs and clickable Link Names In reply to
thank you....works fine
I'm glad that you are that patient with your newbies Smile