The attached add-on files may be out of date. Please visit Devot-ee for the latest versions.
Hi,
This plugin allows you to output info about categories the entry was posted into.
PARAMETERS:
1) entry_id - Required. Alows you to specify entry id number of the entry
which categories you want to display.
2) site - Optional. Default value is “1”.
3) show - Optional. Allows you to specify category id number
(the id number of each category is displayed in the Control Panel).
You can stack categories using pipe character e.g. show=“3|6|8”. Or use “not”
(with a space after it) to exclude categories, e.g. show=“not 4|5|7”.
4) show_group - Optional. show_group - Optional. Allows you to specify category group.
You can stack group id numbers using pipe character show=“1|6|9”. Or use “not”
(with a space after it) to exclude categories, e.g. show_group=“not 5|7|11”.
Also you can use category group names as specified in control panel. You even can mix
category group names and category group id numbers using pipe symbol.
5) invalid_input - Optional. Accepts two values: “alert” and “silence”.
Default value is “silence”. If the value is “alert”, then in cases when some
parameter’s value is invalid plugin exits and PHP alert is being shown;
if the value is “silence”, then in cases when some parameter’s value
is invalid plugin finishes its work without any alert being shown.
Set this parameter to “alert” for development, and to “silence” - for deployment.
VARIABLES:
1) {categories_number} - outtputs number of categories the entry was posted into.
2) {category_levels_number} - outputs number of levels of categories hierarchy.
The plugin supports huge number of variables of the types outlined below (level0 is the highest level of categories, level1 is the level of subcategories of highest level, etc.; category0 is the first category of certain level, category1 is the second category, etc.):
3) {level0_category0_cat_id}, {level0_category1_cat_id}, {level0_category2_cat_id} ...
{level1_category0_cat_id}, {level1_category1_cat_id}, {level1_category2_cat_id} ...
{level99_category99_cat_id}.
4) {level0_category0_cat_name}, {level0_category1_cat_name}, {level0_category2_cat_name} ...
{level1_category0_cat_name}, {level1_category1_cat_name}, {level1_category2_cat_name} ...
{level99_category99_cat_name}.
5) {level0_category0_cat_url_title}, {level0_category1_cat_url_title}, {level0_category2_cat_url_title} ...
{level1_category0_cat_url_title}, {level1_category1_cat_url_title}, {level1_category2_cat_url_title} ...
{level99_category99_cat_url_title}.
6) {level0_category0_parent_id}, {level0_category1_parent_id}, {level0_category2_parent_id} ...
{level1_category0_parent_id}, {level1_category1_parent_id}, {level1_category2_parent_id} ...
{level99_category99_parent_id}.
7) {level0_category0_group_id}, {level0_category1_group_id}, {level0_category2_group_id} ...
{level1_category0_group_id}, {level1_category1_group_id}, {level1_category2_group_id} ...
{level99_category99_group_id}.
8) {level0_category0_cat_description}, {level0_category1_cat_description}, {level0_category2_cat_description} ...
{level1_category0_cat_description}, {level1_category1_cat_description}, {level1_category2_cat_description} ...
{level99_category99_cat_description}.
9) {level0_category0_cat_image}, {level0_category1_cat_image}, {level0_category2_cat_image} ...
{level1_category0_cat_image}, {level1_category1_cat_image}, {level1_category2_cat_image} ...
{level99_category99_cat_image}.
10) {level0_category0_subcats_number}, {level0_category1_subcats_number}, {level0_category2_subcats_number} ...
{level1_category0_subcats_number}, {level1_category1_subcats_number}, {level1_category2_subcats_number} ...
{level99_category99_subcats_number}.
EXAMPLE OF USAGE:
{exp:entry_cats entry_id="3049" site="1"}
{if category_levels_number == 2}
{level0_category0_cat_name}, {level1_category0_cat_name}
{/if}
{/exp:entry_cats}
