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

Help! Problems with showing Links on the Categorie page

Quote Reply
Help! Problems with showing Links on the Categorie page
Hi,

I installed Links 2 on my homepage. It worked. Then I changed somthing in the templates. It doesnīt show the links in the categorie, even there are links. What did I wrong. Here is the extract of the code :
==================
<!-- Subcategories-->
<%if category%>
<TABLE WIDTH="752" BORDER="0" CELLSPACING="2" CELLPADDING="0">
<TR>
<TD WIDTH="100%" BGCOLOR="#013e84"><FONT SIZE="-1" COLOR="#ffffff" FACE="Verdana"> Kategorien</td></tr>
<%category%>
<%endif%>

<!-- Links in this category. -->
<%if links%>
<TABLE WIDTH="752" BORDER="0" CELLSPACING="2" CELLPADDING="0">
<TR>
<TD WIDTH="100%" BGCOLOR="#013e84"><FONT SIZE="-1" COLOR="#ffffff" FACE="Verdana"> Links</td></tr></table>
<h2>Links: </h2>
<%links%>
<%endif%>

<!-- Next/Previous links if spanning pages. -->
<p align=center>
<%if prev%>
<small><a href="<%prev%>">Pre <%build_links_per_page%></a></small>
<%endif%>
<%if next%>
<small><a href="<%next%>">Next <%build_links_per_page%></a></small>
<%endif%>
</p>

<!-- Related Categories -->
<%if related%>
<TABLE WIDTH="752" BORDER="0" CELLSPACING="2" CELLPADDING="0">
<TR>
<TD WIDTH="100%" BGCOLOR="#013e84"><FONT SIZE="-1" COLOR="#ffffff" FACE="Verdana"> Verwandte Kategorien</td></tr>
<ul><%related%></ul>
<%endif%>
</font>
<!-- Search Bar -->
<form action="<%db_cgi_url%>/search.cgi" method="GET">

<TABLE WIDTH="752" BORDER="0" CELLSPACING="2" CELLPADDING="0">
<TR>
<TD WIDTH="100%" BGCOLOR="#013e84"><FONT SIZE="-1" COLOR="#ffffff" FACE="Verdana">Suchen</td></tr>
<div class="margin"></font>
<table border="0" cellspacing="0" cellpadding="0">
<tr><td><strong class="search"><FONT SIZE="-1" FACE="Verdana">
Neue Suche ?</td></tr>
<tr><td><input type="text" size=15 name="query"> <input type=submit value="Suchen!"></td></tr>
<tr><td><a href="<%db_cgi_url%>/search.cgi">Optionen</a></td></tr>
</table>
</div>
</font></form>
==========================
You can watch the pages on http://free.power-lists.de (itīs a german page but youīll find the categories ;-)

Thanx, Daniel

P.S.: I saw that the search results doesnīt show the links - may it be that the variable <%links%> is the problem ???

[This message has been edited by DanielF (edited March 06, 1999).]
Quote Reply
Re: Help! Problems with showing Links on the Categorie page In reply to
From what I see, you are missing some closing </table> tags in a few of your blocks of code. Check through them again. Without closing the tables properly, things will not display. Of particular note is the <%if category%> and <%if related%> blocks. Plus, it looks like you are closing the <%if links%> block before you actually display the links.
Quote Reply
Re: Help! Problems with showing Links on the Categorie page In reply to
I took out the table, and now this is the code :
<!-- Links in this category. -->
<%if links%>
<h2>Links: </h2>
<%links%>
<%endif%>

Now, it must show the links. I saved the template and pressed on "Build All" - then I reload the Pages with the categories... but there was nothing!

Then I took only <%links%>. Nothing happend...

:-( Daniel
Quote Reply
Re: Help! Problems with showing Links on the Categorie page In reply to
Yes, it must be in that order, but look at what you have:

Quote:
<!-- Links in this category. -->
<%if links%>
<TABLE WIDTH="752" BORDER="0" CELLSPACING="2" CELLPADDING="0">
<TR>
<TD WIDTH="100%" BGCOLOR="#013e84"><FONT SIZE="-1" COLOR="#ffffff" FACE="Verdana">
Links</td></tr></table>
<h2>Links: </h2>
<%links%>
<%endif%>

1. You check for the presence of links.

2. You open a table, a table row, and a table data cell.

3. You display the word, "Links".

4. You close the <td>, the <tr>, and the <table>.

5. You display the Links header.

6. You display the links.

Numbers 5 and 6 are coming after you close the table down. They should be before you close the table down, which would eliminate number 3.
Quote Reply
Re: Help! Problems with showing Links on the Categorie page In reply to
Hi again,
I closed the Tabel-Tag now, but nothing happend ...
>Of particular note is the <%if category%> >and <%if related%> blocks. Plus, it looks >like you are closing the <%if links%> block >before you actually display the links.

It must be in that order, mustnīt it ?
<!-- Links in this category. -->
<%if links%>
<h2>Links: </h2>
<%links%>
<%endif%>

Daniel

Quote Reply
Re: Help! Problems with showing Links on the Categorie page In reply to
As I said in my original reply, the <%if links%> block was not the only one you were having problems with. Carefully check over each of the blocks (categories, links, related) and be sure you close the tables properly.

Hi, I have no problems with the other blocks - it shows the correct (sub)categories and relatet cat.. I changed the table tag (it is correct now). And now I have only one problem : the variable <%links%> isnīt changed with the links - it shows nothing ! I donīt now why, but I double checkt it with the other variables, but there is no difference. And the other variables are working.

Daniel
P.S.: Thank you Bobsie that you are helping me !!!
Quote Reply
Re: Help! Problems with showing Links on the Categorie page In reply to
As I said in my original reply, the <%if links%> block was not the only one you were having problems with. Carefully check over each of the blocks (categories, links, related) and be sure you close the tables properly.
Quote Reply
Re: Help! Problems with showing Links on the Categorie page In reply to
According to your original code, you display the links after the category block. According to your original code, the category block has no </table> in it. That may affect the displaying of the links.

If this is not the case anymore (your original code has been changed), post what you are now using. It is difficult to determine what is wrong without seeing what has changed.
Quote Reply
Re: Help! Problems with showing Links on the Categorie page In reply to
Hi,
this is the complete code of the category-template.
========
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html>

<head>
<title>
<%site_title%>: <%category_name%></title>

<%if meta_name%>
<meta name="description" content="<%meta_name%>">
<%endif%>
<if meta_keywords%>
<meta name="keywords" content="<%meta_keywords%>">
<%endif%>

</head>
<BODY BGCOLOR="#ffffff" LINK="#ff9900" ALINK="#ff9900" VLINK="#ff9900">
<FONT SIZE="-1" COLOR="#013e84" FACE="Verdana">
<img src="http://free.power-lists.de/finder.gif" width="160" HEIGHT="35" > Home : <%category_clean%></font><TABLE WIDTH="100%" BORDER="0" CELLSPACING="2" CELLPADDING="0">
<TR>
<TD WIDTH="100%" BGCOLOR="#013e84">
<FONT FACE="Verdana" COLOR="#ffffff" SIZE="-1"
FACE="Verdana">| </FONT><FONT SIZE="-1" FACE="Verdana"><A HREF="http://free.power-lists.de"
class="menulink">Home</A></FONT><FONT COLOR="#ffffff" SIZE="-1"
FACE="Verdana"> | </FONT><FONT SIZE="-1" FACE="Verdana"><A
HREF="http://free.power-lists.de/cgi-bin/add.cgi" class="menulink">Eintragen</A></FONT><FONT
COLOR="#ffffff" SIZE="-1" FACE="Verdana"> | </FONT><FONT SIZE="-1"
FACE="Verdana"><A HREF="http://free.power-lists.de/cgi-bin/modify.cgi" class="menulink">Eintrag
ändern</A></FONT><FONT COLOR="#ffffff" SIZE="-1" FACE="Verdana">
| </FONT><FONT SIZE="-1" FACE="Verdana"><A HREF="http://free.power-lists.de/New"
class="menulink">What's New</A></FONT><FONT COLOR="#ffffff" SIZE="-1"
FACE="Verdana"> | </FONT><FONT SIZE="-1" FACE="Verdana"><A
HREF="http://free.power-lists.de/Cool" class="menulink">What's Cool</A></FONT><FONT
COLOR="#ffffff" SIZE="-1" FACE="Verdana"> | </FONT><FONT SIZE="-1"
FACE="Verdana"><A HREF="http://free.power-lists.de/Ratings" class="menulink">Top
Rated</A></FONT><FONT COLOR="#ffffff" SIZE="-1" FACE="Verdana">
| </FONT><FONT SIZE="-1" FACE="Verdana"><A HREF="http://free.power-lists.de/cgi-bin/jump.cgi?ID=random"
class="menulink">Random Link</A></FONT><FONT COLOR="#ffffff"
SIZE="-1" FACE="Verdana"> | </FONT><FONT SIZE="-1" FACE="Verdana"><A
HREF="http://free.power-lists.de/cgi-bin/search.cgi" class="menulink">Suchen</A></FONT><FONT
COLOR="#ffffff" SIZE="-1" FACE="Verdana"> |</FONT></TD>
</TR>
</TABLE>
<FONT SIZE="-1" COLOR="#013e84" FACE="Verdana">
<!-- Subcategories-->
<%if category%>
<TABLE WIDTH="752" BORDER="0" CELLSPACING="2" CELLPADDING="0">
<TR>
<TD WIDTH="100%" BGCOLOR="#013e84"><FONT SIZE="-1" COLOR="#ffffff" FACE="Verdana"> Kategorien</td></tr> </table> <%category%>

<%endif%>

<!-- Links in this category. -->
<%if links%>
<TABLE WIDTH="752" BORDER="0" CELLSPACING="2" CELLPADDING="0">
<TR>
<TD WIDTH="100%" BGCOLOR="#013e84"><FONT SIZE="-1" COLOR="#ffffff" FACE="Verdana"> Links</td></tr> </table>
<%links%>
<%endif%>


<!-- Next/Previous links if spanning pages. -->
<p align=center>
<%if prev%>
<small><a href="<%prev%>">Pre <%build_links_per_page%></a></small>
<%endif%>
<%if next%>
<small><a href="<%next%>">Next <%build_links_per_page%></a></small>
<%endif%>
</p>

<!-- Related Categories -->
<%if related%>
<TABLE WIDTH="752" BORDER="0" CELLSPACING="2" CELLPADDING="0">
<TR>
<TD WIDTH="100%" BGCOLOR="#013e84"><FONT SIZE="-1" COLOR="#ffffff" FACE="Verdana"> Verwandte Kategorien</td></tr> </table>
<ul><%related%></ul>
<%endif%>
</font>
<!-- Search Bar -->
<form action="<%db_cgi_url%>/search.cgi" method="GET">

<TABLE WIDTH="752" BORDER="0" CELLSPACING="2" CELLPADDING="0">
<TR>
<TD WIDTH="100%" BGCOLOR="#013e84"><FONT SIZE="-1" COLOR="#ffffff" FACE="Verdana">Suchen</td></tr>
<div class="margin"></font>
<table border="0" cellspacing="0" cellpadding="0">
<tr><td><strong class="search"><FONT SIZE="-1" FACE="Verdana">
Neue Suche ?</td></tr>
<tr><td><input type="text" size=15 name="query"> <input type=submit value="Suchen!"></td></tr>
<tr><td><a href="<%db_cgi_url%>/search.cgi">Optionen</a></td></tr>
</table>
</div>
</font></form>
<FONT SIZE="-1" color="013e84" FACE="Verdana">
<p>Pages Updated On: <%date%> - <%time%><br>
Links Engine 2.0 By: <a href="http://www.gossamer-threads.com/">Gossamer Threads Inc.</a></p>
</font>
</body>
</html>
===========
Searchbar, Subcategories and relatet categories are working fine ! The variables are not shown.

Daniel

[This message has been edited by DanielF (edited March 10, 1999).]
Quote Reply
Re: Help! Problems with showing Links on the Categorie page In reply to
V 1.1 !

After I installed everything and running so well. then I go back and tried to edit the SITE_HTML.pl on version 1.1. I tried to add links and validated them .I went back to the site, and I saw NOTHING just ONE link I added before I made the changed to Site_Html.pl...

What could be the problem???

Can't you edit the Site_HTML.pl after you finihsed up eerything and runing on the site???

Quote Reply
Re: Help! Problems with showing Links on the Categorie page In reply to
TriJason,

Please post your message separately from this thread since it has nothing to do with the problem being experienced by DanielF, which has yet to be resolved. That way, it is less confusing and you can be notified of replies to your post.

DanielF,

Change <if meta_keywords%> to <%if meta_keywords%>

Change <img src="http://free.power-lists.de/finder.gif" width="160" HEIGHT="35" > to <img src="http://free.power-lists.de/finder.gif" width="160" HEIGHT="35"> (space before the ending ">")

Change <FONT FACE="Verdana" COLOR="#ffffff" SIZE="-1"
FACE="Verdana">
to <FONT FACE="Verdana" COLOR="#ffffff" SIZE="-1"> (FACE="Verdana" appears twice).

Quote:
<!-- Subcategories-->
<%if category%>
<TABLE WIDTH="752" BORDER="0" CELLSPACING="2" CELLPADDING="0">
<TR>
<TD WIDTH="100%" BGCOLOR="#013e84"><FONT SIZE="-1" COLOR="#ffffff" FACE="Verdana">
Kategorien</td></tr> </table> <%category%>
<%endif%>

Here you open a table for no apparent reason because you close it again. I think what you want is:

Quote:
<%if category%>
<TABLE WIDTH="752" BORDER="0" CELLSPACING="2" CELLPADDING="0">
<TR>
<TD WIDTH="100%" BGCOLOR="#013e84"><FONT SIZE="-1" COLOR="#ffffff" FACE="Verdana">
Kategorien<p><%category%>
</td></tr></table>
<%endif%>

You need to change the <!-- Links in this category. --> and the <!-- Related Categories --> blocks the same way as I show for the category block.

All of these are html coding problems not related to Links itself. The information will display properly when it is coded in html properly. I wish you good luck with it!

[This message has been edited by Bobsie (edited March 10, 1999).]
Quote Reply
Re: Help! Problems with showing Links on the Categorie page In reply to
I did all you wrote, and Links replaced all variables when I build the pages, but not the <%links%> variable.

And now pay attention - I deleted the category template and uploaded the original templated - have a look in the categories of free.power-lists.de an see that all realted and subcategories are shown, but not the <%links%>. May it be, that it is not the template. It could be a *.cgi or *.pl file . I have only opens them one and had a look in the files but I did nothing.

Daniel
Quote Reply
Re: Help! Problems with showing Links on the Categorie page In reply to
Hi Daniel,

I would recommend doing this: Replace your template with just:

Here are my Links: <%links%>

That's it. Nothing else. Now save, rebuild the pages. Do you have any links displayed? If so, then it's an html problem. Go back to what you had before and run your output through an html validator:

http://www2.imagiware.com/...L/htdocs/single.html

Cheers,

Alex
Quote Reply
Re: Help! Problems with showing Links on the Categorie page In reply to
Hi,

I took "Here are my Links: <%links%>" but it displayd only "Here are my Links:" and no links - and in the database are allready 8 links :-( Then I checked my own template on Doctor HTML's Report but there was no error.
That means there is now html-error. But what else can it be ?

Daniel
Quote Reply
Re: Help! Problems with showing Links on the Categorie page In reply to
Hi,
I send the url to you via mail - but in the category there a several links !!! I looked in each category ! Be sure !
And the funny think is, on the search result palette, the links were not shown, too ! On any page the links are shown !

Daniel

Quote Reply
Re: Help! Problems with showing Links on the Categorie page In reply to
Hi Daniel,

Email me a URL to your admin where I can see what's going on. I suspect that there are no links in the category you are looking at, but can verify once I see your admin..

Cheers,

Alex
Quote Reply
Re: Help! Problems with showing Links on the Categorie page In reply to
For those interested, the problem turned out to be the link.html template. It was all one line, which caused confusion with the <%if .. %> and <%endif%> tags which must be on a separate line.

Since links weren't showing up anywhere, the whole set of links was blank.

Cheers,

Alex
Quote Reply
Re: Help! Problems with showing Links on the Categorie page In reply to
Thank you Alex and Bobsie,

Everything is okay, now ! Thank you again ;-)

Daniel