Gossamer Forum
Home : Products : Links 2.0 : Customization :

Output Fields

Quote Reply
Output Fields
I am probably missing the obvious. I would like the Contact Name and Contact Email fields to display with each link listed under a category. I have been tinkering in site_html.pl but with no success. and I must be picking the wrong keywords when searching. Any help would be appreciated

Quote Reply
Re: Output Fields In reply to
In the sub site_html_link routine, you need to add:

Code:

~;
if (($rec{'Contact Name'} neq "") AND ($rec{'Contact Email'} neq "")) {
$output .= qq~<a href="$rec{'Contact Email'}">$rec{'Contact Name'}</a>~;
}


And it is a lot easier to use TEMPLATES than the site_html.pl file especially if you are not familar with Perl programming.

Regards,

Eliot Lee
Quote Reply
Re: Output Fields In reply to
Thanks for the response. I am using Templates so I've been tinkering with the wrong pl file. Is it the same coding if I'm using Templates I've just tried it quickly with no success I'll have another go tomorrow when the brain is refreshed. Thanks again

Quote Reply
Re: Output Fields In reply to
NO....and first of all, if you are using TEMPLATES, you can delete the site_html.pl file. You don't need it.

To make changes, you must edit the link.html file, with the following codes:

Code:

<%if Contact Name%>
<%if Contact Email%>
<a href="mailto:<%Contact Email%>"><%Contact Name%></a>
<%endif%>
<%ifnot Contact Email%>
<%Contact Name%>
<%endif%>
<%endif%>


Regards,

Eliot Lee
Quote Reply
Re: Output Fields In reply to
In Reply To:
if (($rec{'Contact Name'} neq "") AND ($rec{'Contact Email'} neq "")) { $output .= qq~<a href="$rec{'Contact Email'}">$rec{'Contact Name'}</a>~;}
if (($rec{'Contact Name'} ne "") AND ($rec{'Contact Email'} ne "")) {
$output .= qq~<a href="$rec{'Contact Email'}">$rec{'Contact Name'}</a>~;}



Paul Wilson. Shocked
(Dont blame me if I'm wrong!)
Quote Reply
Re: Output Fields In reply to
Uh...ne and neq are the same operators!

Regards,

Eliot Lee
Quote Reply
Re: Output Fields In reply to
Uh....yes I know but what is the point of making it longer than it has to be!

Paul Wilson. Shocked
(Dont blame me if I'm wrong!)
Quote Reply
Re: Output Fields In reply to
Thanks I got it working. Had to add enhanced template support and now I know where to look I can run with it and fine tune the look I want. Thanks I am very impressed