<?
/*************************************************************************************************
Component "Two level groups structure (with element count for each group)".
This component is intended for displaying the list of catalog groups with nested sub levels with element count for each level. Mainly used on the catalog main page.
IBLOCK_TYPE - Information block type
IBLOCK_ID - Information block ID
SECTION_SORT_FIELD - by which field the groups will be sorted, can be used the following values:
sort - by sorting index
timestamp_x - by modification date
name - by group title
id - by group ID
depth_level - nesting lebvel of the group
SECTION_SORT_ORDER - Sorting order for information block groups, following values can be used:
asc - in ascending order
desc - in descending order
SECTION_URL - URL to the page with the group contents
CACHE_TIME - (sec.) time to cache the values selected from database
/*************************************************************************
Work with cache
*************************************************************************/
$CACHE_ID = __FILE__.md5(serialize($arParams).serialize($arrFilter).$USER->GetGroups());
$obCache = new CPHPCache;
if($obCache->StartDataCache($CACHE_TIME, $CACHE_ID, "/")):