EKM Tag: [ekm:categoryid]
This tag is used to output the ID of a category. Using the tag you can find the ID of a category by depth within a category structure or the category ID of the current category or, if on a product page, the ID for the category the product is immediately within.
- Tag Information
- Nesting This Tag
You can specify the depth at which you would like to pull the category ID. This value must be an integer or 'default'
The depth defines how deep into the sub-categories, from the top level category, you want to go.
For Example: If you have a category structure like the example above and you wanted the ID of 'Electronics' your depth would need to be set at
0. However if you wanted the ID of 'Apple' you would set the depth to
The EKM system allows for some tags to be nested within other tags.
In most cases you would nest this tag within a showdata tag's 'location' attribute or within the
When nesting this tag you do not need to make any changes to it. It can be inserted into other tags like below.
[ekm:showdata] ... location='[ekm:categoryid]depth='0';[/ekm:categoryid]'; ... [/ekm:showdata]