EKM Tag: category_menu
This tag is designed for outputting top level category menus. The tag can output categories up to three levels deep and should be used instead of the ekm:showdata tag for category menus.
- Tag Information
The category_menu tag has been specially designed for outputting category menus up to three levels deep as quickly as possibly. It's much faster than the showdata tag and should always be used where categories need to be output.
[ekm:category_menu]
output_start='<ul>';
output_item='<li>[link]</li>';
output_end='</ul>';
[/ekm:category_menu]
ekm:category_menu
tag.
[ekm:category_menu]
levels='3';
location='0';
order_by='orderlocation, name';
edit_buttons='YES';
limit='99';
level_1_limit='98';
level_2_limit='97';
image_width='100';
image_height='100';
output_start='';
output_item='';
output_end='';
output_level_1_start='';
output_level_1_item='';
output_level_1_end='';
output_level_2_start='';
output_level_2_item='';
output_level_2_end='';
exclude_list='';
[/ekm:category_menu]
levels='1';
Sets the number of category levels to output. Set this to 1
and the tag will output top level categories only. Set to 2
to also output child categories or 3
for child and grand child categories.
Here you can specify which category this tag treats as containing the top level categories. This is defined by either specifying a category ID (found in the address bar) or 0
which will show categories in the "home" category.
You can choose the order of the categories output in a category_menu
tag using this attribute. It will allow you to order by name
, id
or orderlocation
Note: Remember if you change this from auto
you will be unable to use the 'Order' controls in the front end of EKM.
order_by
is to order first by orderlocation
which is set using 'Order' controls in 'View Shop' and secondly by name (if two orderlocation values are the same).Orders the outputted data in the order the user has set in the front end (View Shop) of EKM using the order controls.
Orders the product/catgeory by it's product/catgeory ID.
Orders the products or categories by their [name]
.
You are also able to change the direction of the order for this attribute by appending DESC
or ASC
to the end of each value.
Example: Order by id from lowest to highest order_by='id ASC';
or to order highest to lowest use order_by='id DESC';
During the output of categories you can decide whether or not you wish to output edit buttons for each of the items.
The limit
attribute will ensure that the number of top level categories output does not exceed the value you've set.
The level_1_limit
attribute will ensure that the number of level 1 categories output does not exceed the value you've set.
If not set then default to the value of limit
.
The level_2_limit
attribute will ensure that the number of level 2 categories output does not exceed the value you've set.
If not set then default to the value of level_1_limit
.
The EKM shop has a powerful image resizing feature that allows you to upload high resolution images and have the system resize them to a smaller size for displaying on your online shop.
You can specify to only limit the width. This means your images can exceed whatever height you like, but will never exceed the defined width.
Example 1: You have a portrait image of your category. The image is 300 high and 150 wide. You set your image_width
to 100
because you want the width to never be more than 100 pixels width. When the image system does this the height will remain unrestrained and only the width will be reduced.
Example 2: You have a landscape image of a category. The image is 150px wide with 100px high. You set your image_width
to 100
. The image system will now resize this image so the width is no wider than 100px but disregards the height as this can be anything.
NOTE: The image scaling system will never make an image bigger. So if you have an image width smaller than your image_width
the image will remain unchanged at it's original size.
200
which will resize images to 200px
wide.This works exactly like the image_width
attribute however instead of reducing the width to the specified value it will reduce only the height leaving the width to be anything regardless of whether it is greater or less than the value you set.
Example 1: You have a portrait image of one of your categories, you want the height to never exceed 250 pixels
, so you set the image_height
to 250
. Now when your image is resized the width will be ignored but the height will be forced down to 250 pixels.
NOTE: The image scaling system will never make an image bigger. So if you have an image height smaller than your image_height
the image will remain unchanged at it's original size.
200
which will resize images to 200px
high.Here you can specify what will be output at the start of the ekm:category_menu
. Typically you would start to output some HTML.
Example: You would open a containing div
at this point inside followed by a h1
tag for the title "Categories".
"active"
when the parent category is the page currently being viewed by the user."is-limited"
categories being output have been limited by the limit
, level_1_limit
or level_2_limit
attributes.When an category is output from the category_menu it is contained within this attribute. Here you can choose what information will be output and in what order.
Within [ekm:tags] you would need to open and close them in the same way you would open and close HTML tags. However with attribute tags, like the ones below, they are self closing and work alone without any need to close them.
Example:
super-dry-tshirts-c-23.asp
which can be used within a <a href="">
tag.image_width
or image_height
attributes.background-image
using CSS or within img
HTML tag."active"
when the category is the page currently being viewed by the user.output_level_1_start
, output_level_1_item
, output_level_1_end
, output_level_2_start
, output_level_2_item
and output_level_2_end
."active"
when the parent category is the page currently being viewed by the user."is-limited"
categories being output have been limited by the limit
, level_1_limit
or level_2_limit
attributes.Here you will close any HTML tags that were opened within the output_start
attribute.
"active"
when the parent category is the page currently being viewed by the user."is-limited"
categories being output have been limited by the limit
, level_1_limit
or level_2_limit
attributes.Here you can specify what will be output before an level 1 categories. Typically you would start to output some HTML.
Example: You would open a containing div
at this point.
"active"
when the parent category is the page currently being viewed by the user."is-limited"
categories being output have been limited by the limit
, level_1_limit
or level_2_limit
attributes.When an level 1 category is output from the category_menu it is contained within this attribute. Here you can choose what information will be output and in what order.
Within [ekm:tags] you would need to open and close them in the same way you would open and close HTML tags. However with attribute tags, like the ones below, they are self closing and work alone without any need to close them.
Example:
super-dry-tshirts-c-23.asp
which can be used within a <a href="">
tag.image_width
or image_height
attributes.background-image
using CSS or within img
HTML tag.output_level_2_start
, output_level_2_item
and output_level_2_end
."active"
when the category is the page currently being viewed by the user."active"
when the parent category is the page currently being viewed by the user."is-limited"
categories being output have been limited by the limit
, level_1_limit
or level_2_limit
attributes.Here you will close any HTML tags that were opened within the output_level_1_start
attribute.
"active"
when the parent category is the page currently being viewed by the user."is-limited"
categories being output have been limited by the limit
, level_1_limit
or level_2_limit
attributes.Here you can specify what will be output before an level 2 categories. Typically you would start to output some HTML.
Example: You would open a containing div
at this point.
"active"
when the parent category is the page currently being viewed by the user."is-limited"
categories being output have been limited by the limit
, level_1_limit
or level_2_limit
attributes.When an level 2 category is output from the category_menu it is contained within this attribute. Here you can choose what information will be output and in what order.
Within [ekm:tags] you would need to open and close them in the same way you would open and close HTML tags. However with attribute tags, like the ones below, they are self closing and work alone without any need to close them.
Example:
super-dry-tshirts-c-23.asp
which can be used within a <a href="">
tag.image_width
or image_height
attributes.background-image
using CSS or within img
HTML tag."active"
when the category is the page currently being viewed by the user."active"
when the parent category is the page currently being viewed by the user."is-limited"
categories being output have been limited by the limit
, level_1_limit
or level_2_limit
attributes.Here you will close any HTML tags that were opened within the output_level_2_start
attribute.
"active"
when the parent category is the page currently being viewed by the user."is-limited"
categories being output have been limited by the limit
, level_1_limit
or level_2_limit
attributes.Here you can specify the IDs of categories you wish to exclude from the output. All records will then be output, apart from the IDs listed.