Webmastersite.net
Register Log In

Custom Category Type
don not want it displayed in main.tpl

Comments on Custom Category Type

larryjam
Member

Usergroup: Customer
Joined: Sep 25, 2003
Location: Canada

Total Topics: 22
Total Comments: 48
Posted Feb 25, 2007 - 12:39 PM:

I have created a category type called "towns". I created a category called "Localities" and made it a "towns" type. I do not want it to show up in my main.tpl but it does.

I am trying to only have the regular categories show up here but the "Localities" category which is a "towns" type category shows up.

This is the code for my main.tpl, it is the default code:


<!-- BEGIN CATSBODY -->
<table align="center" cellpadding="5" cellspacing="10">
<!-- BEGIN REGULAR -->
<td {CATWIDTH} valign="top" class="category">
<img src="templates/default/images/folder.gif" alt="{CATNAME}"> <a href="{CATURL}" class="categoryname">{CATNAME}</a> ({CATNUMLINKS}) {CATHASNEW} {CATADMIN}<br>
<IF {CATHASDESCRIPTION}>{CATDESCRIPTION} <br></IF>
<IF {SWITCH_FORUMVIEWS}>{CATVIEWS} views<br></IF>
<IF {SWITCH_ONLINEFORUM}>{CATNUMONLINE} viewing<br></IF>
<div class="subcatsmainpage">
<!-- BEGIN SUBSUB -->
<a href="index.php?action=displaycat&catid={CATID}">{CATNAME}</a>,
<!-- END SUBSUB -->
</div>
</td>
<!-- END REGULAR -->
</table>
<!-- END CATSBODY -->

I would expect the "towns" category only to show up if called for e.g.

<!-- BEGIN TOWNS -->
<td {CATWIDTH} valign="top" class="category">
<img src="templates/default/images/folder.gif" alt="{CATNAME}"> <a href="{CATURL}" class="categoryname">{CATNAME}</a> ({CATNUMLINKS}) {CATHASNEW} {CATADMIN}<br>
<IF {CATHASDESCRIPTION}>{CATDESCRIPTION} <br></IF>
<IF {SWITCH_FORUMVIEWS}>{CATVIEWS} views<br></IF>
<IF {SWITCH_ONLINEFORUM}>{CATNUMONLINE} viewing<br></IF>
<div class="subcatsmainpage">
<!-- BEGIN SUBSUB -->
<a href="index.php?action=displaycat&catid={CATID}">{CATNAME}</a>,
<!-- END SUBSUB -->
</div>
</td>
<!-- END TOWNS -->


I have tried to 'hide' this category using the option in edit category, this remove the category from the main.tpl but also from the category selector on the suggestlink.tpl, so if one tries to submit a link to this category, the category is not availabe.

I have also tried to regenerate the categories but it did not work.

How can I remove it from the the main.tpl?
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Feb 25, 2007 - 2:20 PM:

If you don't specify a type in the template, it'll fall back on whatever is available in the template. If you want it to display a blank, write it out with blank content.
larryjam
Member

Usergroup: Customer
Joined: Sep 25, 2003
Location: Canada

Total Topics: 22
Total Comments: 48
Posted Feb 25, 2007 - 5:18 PM:

Thank you Paul, works fine now.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.