Latest Register Log In

+ Advanced Search

Category Variables

Category Variables
By
09/24/03 (Edited 10/07/13)

{CATHASNEW} - If there's a new link in the category, returns the image code for the updated image... otherwise, empty.
{CATHASNEWBOOL} - A true/false for use in conditionals to replace {CATHASNEW}.
{CATADMIN} - If viewer can edit category, returns the edit listing for it... otherwise, empty.
{CATNUMSUBCATS} - The number of subcategories in the category
{CATNUMSUBCATSALL} - The number of subcategories including personal link lists if applicable.
{CATNUMLINKS} - Number of links in the category plus all its subcategories.
{CATLINKSHERE} - Number of links in the category excluding subcategories.
{CATSUBCATS} - HTML for displaying the subcategories of the category.
-- Optional parameters: html to use for each category, maximum number to show. limits list to 5.
{CATPARENTNAME} - The name of this category's parent category.
{CATALIASEDIN} - A list of secondary locations of the category.
{CATORIGCATNAME} - The name of the primary category of an alias, otherwise just the category name.
{CATORIGCATURL} - The url of the primary category of an alias, otherwise just the category url.
{CATNUMBERRELATED} - The number of categories related to this category.
{CATDATE} - Date on which the category was added.
{CATLASTEDITDATE} - Date on which the category was last edited.
{CATLASTLINKDATE} - The date of the last link addition in the category.
{CATLASTLINKTIME} - The time (as number of seconds since 1970) of the last link addition in the category.
{CATNAMEWITHNAV} - The full path and category (excludes the top level index link).
{CATNAV} - Navigation path to the category (link to parents)
-- Optional parameters: nospace (removes spaces), bookmarkable (removes html) and trimset (trims off the nav separator character).
{CATTITLENAV} - The navigation, but without HTML, suitable for use in the language item title_categories.
-- Optional parameters: navseperator, trimseparator
{CATTYPEOPTIONS} - The options for selecting the category type.
{CATLINKSELECTOR} - Options usable for maping a dropdown selector of all links in the category -- quick jump to a link using a selector.
{CATID} - The id number of the category.
{CATNAME} - Name of the category.
{CATPARENT} - The id number of the category's parent category.
{CATDESCRIPTION} - Description of the category.
-- Optional parameter: number of characters.
{CATDESCRIPTIONSTRIPPED} - The description with HTML removed.
{CATCUSTOM} - The custom template this category uses if applicable.
{CATHEADERINFO} - This category's header info (meta tags, etc)
{CATTYPE} - The category type of this category.
{CATTOTALCOMMENTS} - The total number of comments for all links in the category.
{CATISBENEATH[x]} - This will return a true or false depending on if the current category is somewhere beneath the target category x in your directory structure. x needs to be the id number of the category you want to know if this is below. (This is useful for some conditionals.)
{CATLEVELSDEEP} - The number of levels deep the category is, 0 being a main category, 1 a subcategory, etc.
{CATRANDOMLINK} - Returns link to a randomly selected link from the category.
-- Optional paramater: template. Defaults to <a href="{TRACKLINKURL}">{LINKTITLE}</a>
{CATSTATICNAME} - The static file name (with path if applicable) that would be generated for this category if you're using HTML generation.
{CATTYPETOTAL[typename]} - The total number of listings in the category which are of the type typename. For example, 17 for regular listings.
{CATVIEWS} - The number of unique views of the category.
{CATLASTTHREADID} - The id of the most recently posted to thread in the category.
{CATLASTHREADTITLE} - The title of the most recently posted to thread in the category.
{CATLASTPOSTERID} - The id of the last poster in the most recently posted to thread in the category.
{CATLASTPOSTERNAME} - The name of the last poster in the most recently posted to thread in the category.
{CATLASTCOMMENTDATE} - The date/time of the most recent comment posted in the category.
{CATCHECKED[field <,> value]} - Test whether a checkbox field is checked for the specified value (if only one value, you can skip the value).
{CATTOPLEVELID} - The id of the top level ancestor of the category (if the category is at the top level, then its own id).
{CATTOPLEVELNAME} - The name of the top level ancestor of the category (if the category is at the top level, then its own id).
{CATNUMBER} - The position of the category's appearance in the category listings.
{CATSUMFIELD[fieldname]} - Gets the sum of values for the category for any numeric field. You can pass a number of decimal places as a second parameter, the default is two.
{CATLASTAVATARURL} - The URL of the avatar of the last poster in a thread in the category.
-- Optional parameters: maximum width and height of the avatar. Example: {CATLASTAVATARURL[30 <,> 15]}
{CATSUBSCRIBERLIST} - Lists the members subscribed to the category.
-- Optional parameter: Format, which defaults to <a href="{MEMBERPROFILEURL}">{MEMBERNAME}</a>,
{CATFOLDERIMAGE} - The URL of the folder icon -- either the default ones or a custom uploaded one.
-- Optional parameters: width and height in pixels. Defaults to size of uploaded image. Use {CATFOLDERICON[100 <,> 150]} for 100x150.

{NUMBER} and {LETTER} can also be used with categories to display the order of their appearance. Using {NUMBER} they'll be numbered from 1 on up, using {LETTER} they'll be labeled from a to z.

To show the total of each type within a category while on the display listings page, use {REGULARTOTAL}, {OTHERTYPETOTAL} etc. Elsewhere use CATTYPETOTAL as explained above.

To show the moderators of a category, use

<IF {CATHASMODERATORS}><!-- BEGIN MODERATORS --><a href="memberlist.php?action=profile&id={MEMBERID}" class="{MEMBERGROUPNAMESTYLE}">{MEMBERNAME}</a >,
<!-- END MODERATORS --></IF>


When you want your category variable to be for the category page being viewed, even when you're in a smaller category scope (such as a toplist or similar categories), use {THISCAT instead of {CAT.




Description Summary of each category template variable.
Rating
Views 6910 views. Averaging 1 view per day.