Gossamer Forum
Home : Products : Links 2.0 : Customization :

Template Question

Quote Reply
Template Question
Is it possible in my home.html template (Only the home page, not the subcategories pages) to have just the number of links shown for a top category?

For example: I have my home page set up with graphics and links to the subcategory pages, and all I need to be updated when I rebuild the pages is the links in each top category.

Graphic for top category 1 Graphic for top category 2 Graphic for top category 3

(# of links in top cat 1) (# of links in top cat 2) (# of links in top cat 4)



The linked graphics are in a table, each in their own cell, with a corresponding cell below for the link count in each category (3 top level categories). I tried some different <%if...%> statements with <%links> and <%category_name%> but could not get any combination to work.

It is probably an easy answer for someone familiar with perl. I am learning, but not there yet.

Thanks in advance. Charlie
Quote Reply
Re: [cvance] Template Question In reply to
hi there,

lets try to help us between novices:)




<!-- Subcategories-->
<%if category%>
<h2>Categories:</h2>
<%category%>
<%endif%>

<!-- Links in this category. -->
<%if links%>
<h2>Links: </h2>
<%links%>
<!-- Next/Previous links if spanning pages. -->
<p align=center>
<%if prev%>
<small><a href="<%prev%>">Prev <%build_links_per_page%></a></small>
<%endif%>
<%if next%>
<small><a href="<%next%>">Next <%build_links_per_page%></a></small>
<%endif%>




Try to put the

<%if links%>

<%endif%>
in the subcategory %


<!-- Subcategories-->
<%if category%>


I am not sure but give it a try, actually i never tried to make appear number of links in subcategories.

Good luck (if this works)

Saludos



Chris
Quote Reply
Re: [Livecam] Template Question In reply to
Thanks for the reply. I found another thread with some conditional statements in the site_html_templates.pl file in the sub site_html_print_cat that I adapted a little bit and got to work. If you would like I will post the changes I made if you think anyone else might be interested. I adapted it from a thread on "Graphics for Category Names".

Charlie