Category Component

Returns category hierarchy with category properties available on the site.

URL Parameters

Name Value Description
root category_name Name of the category data requested for.
select select_string Determines properties written out.
depth number Sets the number of nesting levels for the child nodes in the request. Depth=1 requests only direct children.
hidezerohits true | false Hides (TRUE) or shows (FALSE) categories having zero hit count value.
filter hit-top(number) | total-top(number) | none If select_string contains "children" then no more than number children node will be returned with maximum values of hit-count or total-count attribute. Default value is none
q, x, d, s, mh Specifies the query for hit-count calculation. Similar to XHitList URL-parameters.

Select request values parameters

Value Description
name Returns category's name.
title Returns category's title.
total-count Returns the total amount of documents belonging to the category.
hit-count Returns the total amount of documents belonging to the category AND the query specified in q, x, d, s, mh parameters.
has-children Returns a flag indicating presence of children for the category.
path Returns all parent categories of the specified category. For example, if category=year/september/15 then properties of the year/september and year will be also returned.
children Returns children in of the category.

Sample Request

http://localhost/NXT/Gateway.dll?f=category&
root=medals&
select=name;title;children;total-count;has-children&
depth=1

The result of this sample request is the following XML file:


<?xml version='1.0' encoding='utf-8'?>
<category-tree>
	<category name="medals" title="Medals" total-count="11481" has-children="yes">
		<category name="medals/1" title="1" total-count="8625" has-children="no"/>
		<category name="medals/2_more" title="2 and more" total-count="2856" has-children="no"/>
		<category name="medals/3_more" title="3 and more" total-count="944" has-children="no"/>
		<category name="medals/5_more" title="5 and more" total-count="194" has-children="no"/>
		<category name="medals/7_more" title="7 and more" total-count="51" has-children="no"/>
	</category>
</category-tree>