Documentation
SEARCH CATEGORIES
usage
<SEARCH>
<CATEGORIES [ID="number"] [fatherID="number"] [name="string"] [path="string"]>
[<UNIQUENAME>string</UNIQUENAME>]
[<FATHERNAME>string</FATHERNAME>]
[<FULLTEXT>string</FULLTEXT>]
</CATEGORIES>
[<RETURN depth="number" languageID="language code" totalElements="true/false" />]
[<SORT select="@ID / @path / UNIQUENAME / @fatherID / LABEL" order="ascending/descending" />]
</SEARCH>
parameters
ID: the ID of the category
fatherID: the ID of the parent category
name: the technical name of the category (different of its translations/labels)
path: the path of the category. Composed of the module then the denominations of all its ancestors.
UNIQUENAME: the technical name of the category (equivalent to use the name attribute)
FATHERNAME: the technical name of the parent category
FULLTEXT: used to search in the labels of the category
depth: how many levels of subcategories you want in the output
languageID: in which language you want to get the labels
totalElements: if you want to know how many elements are in the categories
select: on which information you want the sort to be made
order: in which order you want to sort
Search in the categories and get infos about them
examples
<SEARCH>
<CATEGORIES ID="2" />
<RETURN depth="2" languageID="fre" />
<SORT select="LABEL" order="ascending" />
</SEARCH>
Gets the category with ID=2 and its subcategories (depth=2), in french, sorting on the label of the category in this language
<SEARCH>
<CATEGORIES>
<FULLTEXT>sport</FULLTEXT>
</CATEGORIES>
<RETURN depth="1" languageID="fre" />
<SORT select="UNIQUENAME" order="ascending" />
</SEARCH>
Gets the categories with labels containing "sport", not returning the subcategories, sorting on the technical name
<SEARCH>
<CATEGORIES name="WinterSport"/>
</SEARCH>
Gets the category with the technical name "WinterSport".
<SEARCH>
<CATEGORIES path="/contact/"/>
<RETURN depth="2" languageID="fre" />
<SORT select="@ID" order="ascending" />
</SEARCH>
Gets the root categories for the contact element type, returning the subcategories and sorting on the ID