DLMenu is DocLister based replacement of Wayfinder. Among perfomance and flexibility, the main features are:
Use DocLister parameters to sort and to limit data selections (sortBy, sortDir, orderBy, addWhereList and so on). The results are sorted by menuindex field in ascending order by default, documents having hidemenu=1 are ignored.
Prepare parameter is impossible to set for particular menu level (for example, prepare2). But you can get level value from $data['level'] inside of snippet. tvList parameter is applied to all levels as well.
Level number should be decreased by 1 in template parameters (for example, rowTpl2 will be applied to documents of the third level, and rowTpl0 - of the first one).
List of document ids to build menu from, comma separated. If these documents have different parents, then several menus will be built. To keep parents order provided in this parameter, set the value of sortType1 parameter to "doclist".
Possible values - comma separated ids.
Default - id of the resource, where the snippet has been called.
List of document ids to build plain menu. If set, "parents" parameter will be ignored, as well as "maxDepth". All documents from this parameter are assumed to have parent=0. The original parent field value stored in the "_parent" field.
Maximum level of the menu.
Possible values - number starting from 1.
Default - 10.
If the value is 1, then documents provided in parents parameter will be shown.
Possible values - 0 or 1.
Default - 0.
Set to 1 to output results as json array.
Possible values - 0 or 1.
Default - 0.
Set to 1 to hide inactive brances.
Possible values - 0 or 1.
Default - 0.
When hideSubMenus parameter is set, it's possible to provide parent document ids to make their direct descendants always visible.
Possible values - comma separated ids.
Default - not defined.
If the value is 1, then the amount of the direct children of all the resources in the menu will be counted.
Possible values - 0 or 1.
Default - 0.
Placeholder name to store document title.
Default - title.
If several parents are provided showParent parameter if off, then snippet outputs several menus. This parameter allows to join them.
Possible values - 0 or 1.
Default - 0.
Wraps the whole menu.
Possible values - name of a template given according to the DocLister template setting rules.
Default:
@CODE:<ul[+classes+]>[+wrap+]</ul>
Template to output a document of the first level without chilrden. rowHereTpl is applied to the current document.
Possible values - name of a template given according to the DocLister template setting rules.
Default:
@CODE:<li[+classes+]><a href="[+url+]">[+title+]</a></li>
Template to output a document having children. Use parentRowHereTpl for the current parent document or parentRowActiveTpl - for the active one.
Possible values - name of a template given according to the DocLister template setting rules.
Default:
@CODE:<li[+classes+]><a href="[+url+]">[+title+]</a>[+wrap+]</li>
Wraps child elements.
Possible values - name of a template given according to the DocLister template setting rules.
Default - outerTpl value.
Template to output a child document. innerRowHereTpl template can be set for the current document.
Possible values - name of a template given according to the DocLister template setting rules.
Default - rowTpl value.
Template to output category (the document having isfolder=1 and _blank template or if its link_attributes field value contains "category").
Possible values - name of a template given according to the DocLister template setting rules.
Default - parentRowTpl value.
Document classes:
It's possible to define your own classes using prepare-snippet:
$data['classes'] = array('myClass'=>'my');
Wrapper classes:
It's also possible to use placeholders set by e extender, and placeholders of particular classes: [+oddClass+], [+rowClass+] and so on.