1
kalamata
WebLinks
  • 2005/10/29 20:23

  • kalamata

  • Not too shy to talk

  • Posts: 121

  • Since: 2005/3/3 1


Dear All,

I am trying to present web links ctaegories and sub-categories in a different way than the original. I would like to have a row with two columns for each web link category - the one on the left will have the name of the category and the column on the right will have the name of the sub-categories. For example, if you have two categories and the second one has two sub-categories, then I would like my display to be like the following:
<pre>
Category 1 (4)
Category 2 (5) Sub-Category 1 (12)
Sub-Category 2 (12)
</pre>

I wrote the following code for that:
<{if count($categoriesgt 0}>
<
hr />
<
table border='0' cellspacing='5' cellpadding='0' align="center">
<
tr>
<!-- 
Start category loop -->
<{foreach 
item=category from=$categories}>

<
td valign="top">

<{if 
$category.image != ""}>
<
a href="<{$xoops_url}>/modules/mylinks/viewcat.php?cid=<{$category.id}>"><img src="<{$category.image}>" height="50" border="0" alt="" /></a>
<{/if}>

</
td>
<
td valign="top" width="40%"><a href="<{$xoops_url}>/modules/mylinks/viewcat.php?cid=<{$category.id}>"><b><{$category.title}></b></a>&nbsp;(<{$category.totallink}>)<br /></td>
<{if 
count($infercategoriesgt 0}>
<{foreach 
item=subcat from=$infercategories}>

<
td>
<
a href="<{$xoops_url}>/modules/mylinks/viewcat.php?cid=<{$subcat.id}>"><b><{$subcat.title}></b></a>&nbsp;(<{$subcat.totallink}>)
</
td>
<{/foreach}>
<{/if}>
</
tr>
<
tr>

<{/foreach}>

However, I have problems in getting the sub-categories to work - if I am not wrong infercategories is used by XOOPS to denote sub-categories, or am I wrong?

I look forward to hearing from you soon.

Thanks,
George

Login

Who's Online

101 user(s) are online (70 user(s) are browsing Support Forums)


Members: 0


Guests: 101


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits