Gossamer Forum
Home : Products : Links 2.0 : Installation -- Unix :

if tags (<%if variable%> )

Quote Reply
if tags (<%if variable%> )
I am attempting to install links2 using a GBResources template #4. Some information is not being displayed. The following note appears in the admin Edit template help section.
"When Links sees the 'if meta_keywords' it will print everything up to the endif tag, if and only if, this template has something defined for meta_keywords.

Warning: Links can not understand the <%if variable%> unless it appears on a line by itself. Any other information found on the same line will be skipped, which may cause information not to be displayed."
When I move the if tags to separate lines it changes the look of the page.
Is there another fix for this besides moving the if tags to lines of their own?
Thanks


Quote Reply
Re: if tags (<%if variable%> ) In reply to
Install the enhanced template sub.

Moving tags to a new line shouldn't be changing the layout anyway.

Paul Wilson.
http://www.wiredon.net/gt/
http://www.perlmad.com/
Quote Reply
Re: if tags (<%if variable%> ) In reply to
Thanks, but I installed the enhanced template mod and it still does not work.
You can check it out at...
http://www.valiantlounge.com/cgi-bin/pages/
The admin is not PW protected, so you can check that out also.
I can't figure this out.
Thanks

Quote Reply
Re: if tags (<%if variable%> ) In reply to
You shouldn't put your pages directory inside the cgi-bin.

Secondly put your tags on individual lines.

If neither of those ideas work then let us know.

Paul Wilson.
http://www.wiredon.net/gt/
http://www.perlmad.com/
Quote Reply
Re: if tags (<%if variable%> ) In reply to
Re: GB resources templates.
I reloaded all files and templates,used template set 3 this time.All the permissions are correct, then I copied and pasted the
sub site_html_print_cat { into the site_html_template file
as per installation instructions.
Copied and Pasted the enhanced template sub. into Template.pm, this does not solve the if tag problem.
I keep having the same problem.
If I move the if tags to separate lines in the category.html, the links are there but when you click on a link the category pages are all white and deformed
If I don't make any changes to the category.html, No links or categories will show in the home, Just half tags as shown in this example.
links%>
I checked all the tags in the templates and they are all Full tags. such as >>>> <%links%>
check it at http://www.primefind.com/pages
When you click on the link, refresh the page and see the result.
Thanks,
Bewildered

Quote Reply
Re: if tags (<%if variable%> ) In reply to
Are there any css references in the templates causing the layout problems?

Paul Wilson.
http://www.wiredon.net/gt/
http://www.perlmad.com/
Quote Reply
Re: if tags (<%if variable%> ) In reply to
Good Question, I don't know that much about css.
Here is the category.html source... Maybe you can spot something that I have overlooked.
Thanks,
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Mozilla/4.7 [en]C-CCK-MCD NetscapeOnline.co.uk (Win98; I) [Netscape]">
<title><%site_title%></title>

</head>
<body text="#000000" bgcolor="#666666" link="#000000" vlink="#000000" alink="#FFFFFF" TOPMARGIN="0" BOTTOMMARGIN="0" LEFTMARGIN="0" RIGHTMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0">



<center><table BORDER=0 CELLSPACING=0 CELLPADDING=2 COLS=1 WIDTH="754" BGCOLOR="#333333" >
<tr>
<td BGCOLOR="#333333">
<table BORDER=0 CELLSPACING=0 CELLPADDING=0 COLS=1 WIDTH="100%" >
<tr>
<td BGCOLOR="#7B040D">
<table BORDER=0 CELLSPACING=5 CELLPADDING=0 COLS=1 WIDTH="100%" >
<tr>
<td BGCOLOR="#CB0716"><b><font face="Verdana"><font color="#FFFFFF"><font size=+1><%site_title%>:
<%category_clean%></font></font></font></b></td>
</tr>
</table>
</td>
</tr>
</table>

<table BORDER=0 CELLSPACING=0 CELLPADDING=0 COLS=3 WIDTH="100%" >
<tr VALIGN=TOP>
<td VALIGN=TOP WIDTH="5" BGCOLOR="#7B040D"> </td>

<td WIDTH="595" BGCOLOR="#FFFFFF">

<font face="Verdana"><font size=-1><%if meta_name%> <%endif%><%if meta_keywords%><%endif%> </font></font><link rel=stylesheet href="<%build_root_url%>/links.css" type="text/css" title="<%site_title%> style sheet">

<font face="Verdana"><font size=-1><%if related%> </font></font>

<b><font face="Verdana"><font color="#000000"><font size=-1>Related
Categories:</font></font></font></b>
<ul><font face="Verdana"><font size=-1><%related%></font></font></ul>
<font face="Verdana"><font size=-1><%endif%> </font></font></td>

<td VALIGN=TOP WIDTH="150" BGCOLOR="#7B040D">
<center><table BORDER=0 CELLSPACING=0 CELLPADDING=0 COLS=1 WIDTH="95%" >
<tr>
<td VALIGN=TOP BGCOLOR="#333333">
<table BORDER=0 CELLPADDING=0 COLS=1 WIDTH="100%" >
<tr>
<td BGCOLOR="#CB0716">
<center><b><font face="Verdana"><font color="#FFFFFF"><font size=-1>Site
Menu</font></font></font></b></center>
</td>
</tr>

<tr>
<td BGCOLOR="#FFFFCC"><b><font face="Verdana"><font size=-1><a href="<%build_root_url%>">Home</a></font></font></b></td>
</tr>

<tr>
<td BGCOLOR="#FFFF99"><b><font face="Verdana"><font size=-1><a href="<%db_cgi_url%>/add.cgi">Add</a></font></font></b></td>
</tr>

<tr>
<td BGCOLOR="#FFFF00"><b><font face="Verdana"><font size=-1><a href="<%db_cgi_url%>/modify.cgi">Modify</a></font></font></b></td>
</tr>

<tr>
<td BGCOLOR="#FFCC00"><b><font face="Verdana"><font size=-1><a href="<%build_root_url%>/New">New</a></font></font></b></td>
</tr>

<tr>
<td BGCOLOR="#FCAD36"><b><font face="Verdana"><font size=-1><a href="<%build_root_url%>/Cool">Cool</a></font></font></b></td>
</tr>

<tr>
<td BGCOLOR="#F98239"><b><font face="Verdana"><font size=-1><a href="<%build_root_url%>/Ratings">Top
Rated</a></font></font></b></td>
</tr>

<tr>
<td BGCOLOR="#FE5334"><b><font face="Verdana"><font size=-1><a href="<%db_cgi_url%>/search.cgi">Search</a></font></font></b></td>
</tr>

<tr>
<td BGCOLOR="#FA3D05">
<center><form action="<%db_cgi_url%>/search.cgi" method="GET"><input type="text" size=15 name="query"><input type=submit value="Search!"></center>
</td>
</tr>

<tr>
<td></form></td>
</tr>
</table>
</td>
</tr>
</table></center>
</td>
</tr>
</table>

<table BORDER=0 CELLSPACING=0 CELLPADDING=0 COLS=1 WIDTH="100%" >
<tr>
<td WIDTH="70" BGCOLOR="#7B040D">
<div align=right><b><font face="Verdana"><font color="#FFFFFF"><font size=-2><a href="#top">Top</a></font></font></font></b></div>
</td>
</tr>
</table>
</td>
</tr>
</table></center>

<center>
<p><font face="Verdana"><font color="#FFFFFF"><font size=-2>Links Engine
2.0 By: <a href="http://www.gossamer-threads.com">Gossamer Threads Inc.</a></font></font></font>

<font face="Verdana"><font color="#FFFFFF"><font size=-2>Using Templates
by
<a href="http://cgi-resource.co.uk">GB Resources</a></font></font></font></center>

<p>

</body>
</html>


Quote Reply
Re: if tags (<%if variable%> ) In reply to
Get rid of this....

<link rel=stylesheet href="<%build_root_url%>/links.css" type="text/css" title="<%site_title%> style sheet">



Paul Wilson.
http://www.wiredon.net/gt/
http://www.perlmad.com/
Quote Reply
Re: if tags (<%if variable%> ) In reply to
GREAT!!! That's it Paul,
That did the trick, I don't know what the following tags were there for or what removing them did, But I do know that the problem is solved.
<link rel=stylesheet href="<%build_root_url%>/links.css" type="text/css" title="<%site_title%> style sheet">
Thanks again

Quote Reply
Re: if tags (<%if variable%> ) In reply to
Hi, glad I could help.

The tag references the css file which creates the default color scheme. It was conflicting with your custom code.

Paul Wilson.
http://www.wiredon.net/gt/
http://www.perlmad.com/