Miva Merchant 4 Module FAQs » Category Page Templates (BROK_CTGYTEMPLATES)


Displaying Listing of a Category's Sub-categories

Is it possible to display a listing of a category's sub-categories? (2003/04/25)

Yes. This feature was added in version 4.72 (non compiled)/4.73c (compiled). A new tab has been added to templates, Sub-categories. On this tab you can specify templates that are used to display the sub category listing. By adding the token %subcats% to the main template (on the template's initial configuration screen) you can list the sub-categories. By default, adding the token is not present in the main template. However, to display it in it's default layout, add the code/html:


The tokens %begin_hassubcats%...%end_hassubcats% will display their contents ONLY if the category has subcategories (similarly, hte tokens %begin_hasnosubcats%...%end_hasnosubcats% will display their contents ONLY if the category does NOT have subcategories).

Adding this token will display the sub-categories in the form:

Sub Category 1
Sub Category 2
	sub sub Category3
	sub sub Category4
Sub Category 5
	sub sub Category 6
		 sub sub Category 7
	sub sub Category 8

i.e. the subcategories are indented, and subcategories of subcategories are indented again. To NOT expand the tree past the first level, simply remove the "%begin_hassubcats%...%end_hassubcats%" section from the "sub-sub category main template".

The "Sub-category row template" is used to control display of the main sub-category listing. By default it displays only 1 category across. This "row" template works similarly to other row template areas in this module (i.e. to display a second sub-category in the row, you would add a token %subcat|02|% and make the necesssary html changes).

The "Sub-category main template" is used to display the main sub-categories.

The "sub-sub category row template" is used to control the display of the sub-sub category rows.
The "sub-sub category main template" is used to display the sub-sub categories.

Last update: 2003-07-29 00:42
Author: Support
Revision: 1.0

Print this record Send FAQ to a friend Show this as PDF file
Please rate this FAQ:

Average rating: 0 out of 5 (0 Votes )

completely useless 1 2 3 4 5 most valuable

You cannot comment on this entry

Records in this category