PDA

View Full Version : Remove href when no link is given


Sagobal
07-17-2009, 08:44 AM
Hi.
I like to use GAL for linking and explaining. So sometimes an explanation dosn't have a link. The problem is, without a link it links to the same page in a new target. So I like to remove the linking funtion if there is no link given.

Can someone help me?

Sagobal
07-17-2009, 09:50 AM
I found the soution.

Change the gal_link_popup to:
<if condition="empty($gal[url])">
<a class="gal" id="$gal[tagid]">$gal[match]</a>
<else />
<a href="$gal[url]" target="_blank" class="gal" id="$gal[tagid]">$gal[match]</a>
</if>



And change the CSS to:
/* GAL Defns */
a.gal
{
text-decoration: none;
border-bottom: 1px dotted #016798;
color: #016798;
padding: 0 0 0 12px;
background: url(images/misc/exlinkon.gif) no-repeat 0;
}
a.gal:visited
{
text-decoration: none;
border-bottom: 1px dotted #016798;
color: #016798;
padding: 0 0 0 12px;
background: url(images/misc/exlinkon.gif) no-repeat 0;
}
a.gal:hover, a.gal:active
{
text-decoration: underline;
border-bottom: 0px dotted #F8BF24;
color: #016798;
padding: 0 0 0 12px;
background: url(images/misc/exlink.gif) no-repeat 0;
}