Gossamer Forum
Home : Products : Links 2.0 : Customization :

<%if tag%> question.

Quote Reply
<%if tag%> question.
I've added new field Software Url, it's url that links to a file. So on my Detail page I want to out



Software : if there is a link I want it to link "Download Now" if there isn't a link I want it to say Not Available.



How can I make this work.



Thanks
Quote Reply
Re: [intellie] <%if tag%> question. In reply to
I'm not the best one to answer this, but I'm the first...
If your new field is 'software', then try:

In sub build_detailed_page in nph-build.cgi, after this:

$title_linked = &build_linked_title ("$rec{'Category'}/$rec{'Title'}");

put this:
Code:

if ($software eq "") {
print qq~Not Available. ~;
}
else {
print qq~<a href="$software">Download Now!</a> ~;
}
----------------

You will probably need to add $software to a 'my' or 'local' declaration somewhere, and put software => $software in sub build_detailed_page in stei_html_templates.pl.


Also, put <%software%> in detail.html where you want the output to be. I think...


Leonard
aka PerlFlunkie

Last edited by:

PerlFlunkie: Jan 4, 2003, 10:58 PM
Quote Reply
Re: [PerlFlunkie] <%if tag%> question. In reply to
<%if Software%>
<%software%>
<%endif%>

<%ifnot Software%>
Download Unavailable
<%endif%>

Stu2000

- Top 100 forums / GT Links 2.0 websites -