Retired Documentation:  You are using the documentation for version 1.7.3 which was retired in 2013. Go here for the latest version documentation or check here for your available upgrades to the latest version.

Weblog Category Heading Tag

The purpose of this tag is to show the currently viewed category as a heading.

{exp:weblog:category_heading}

<h1>{category_name}</h1>

{if category_description}
<p>{category_description}</p>
{/if}

{/exp:weblog:category_heading}

When you visit on one of your category links, your weblog entries are shown sorted by the chosen category. This tag lets you dynamically show the name of the category being viewed.

If no categories are being shown, the tag will not show anything contained within the opening and closing pair.

Parameters

disable=

disable="category_fields"

The disable= parameter allows you to turn off aspects of the tag that you might not be using in order to improve performance. Valid options are:

relaxed_categories=

relaxed_categories="yes"

This parameter allows you use the category indicator in your URLs with an entries tag specifying multiple weblogs that do not share category groups.

weblog=

weblog="news"

The name (short name) of the weblog that the categories are assigned to. Note: Unless you are using the relaxed_categories parameter, you can only list one weblog name, since each weblog can have separate category groups.

You must specify this parameter if you use the category name in URL feature.

Variables

category_description

{category_description}

This variable simply displays the content from the "category description" field. The variable may also be wrapped in a conditional statement so that it only displays if there is content in the field:

{if category_description}{category_description}{/if}

category_id

{category_id}

The category ID associated with the category.

parent_id

{parent_id}

The category ID associated with the category's parent (or 0 in the case of a top level category).

category_image

{category_image}

The image link (or other information) you can optionally store with each category within the Control Panel.

category_name

{category_name}

The name of the category being viewed

category_url_title

{category_url_title}

This variable displays the URL title of the category

Custom Category Fields

All custom fields assigned to a category can be accessed using the "short name" of the field:

{class}
{extended_description}
{category_name_fr}
etc..

These are totally dynamic in that any field you create for your category will automatically be available by its "short name" as a variable.

Top of Page