Categories > TinyButStrong general >

categories and sub-categories

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: bassem
Date: 2004-03-31
Time: 11:44

categories and sub-categories

hi,
i'm trying to combine and show a list of categories and subcategories. I have a table named category and another one named sub_category. I use this code :
<table width="400" border="1" align="center" cellpadding="4" cellspacing="0" bordercolor="#3399CC">
  <tr>
    <td><strong>Rubrique :</strong> [rub.rubrique;block=tr]<br>      
    <strong>Total :</strong> [rub.#]<br>      <br>
      <table border="1" align="center" cellpadding="2" cellspacing="0">
        <tr bgcolor="#CACACA">
          <td width="30"><u>Position</u></td>
          <td width="150"><u>Pseudo</u></td>
        </tr>
        <tr bgcolor="#F0F0F0">
          <td>[srub.#]</td>
          <td>[srub.sous_rubrique;block=tr;p1='[rub.id]']</td>
        </tr>

      </table>
     </td>
  </tr>
</table>
but the problem is if a sub category is empty it will show me just the title without any contains, how can i put a condition or something like that !!?
By: RwD
Date: 2004-03-31
Time: 13:59

Re: categories and sub-categories

TBS Block's parameters: top

nodata -> Indicates the section that is displayed when there is no data in the data source.

Perhaps the nodata option will work for you? check out the examples, I think there is an example of how to do subcategories

Also check my posts about the navbar, it contains a method to remove blocks of html when you don't need them (search for navbar feature (it is about a feature I propose))