Install

How to install and use

1. You can install ModTree on https://modstore.pro/extras/. Read how to install.

2. Other way to install - download the packache on our website.

Put package to {your site directory}/core/packages/ by FTP.
Install by Extras -> Installer -> Search Locally by Packages.

JQuery not required.

Make relations between resources on page Extras -> ModTree. See screen.

Call snippet on template
[[modTree]].

Parameters

Result parameters

&tplOuter - main template. Default `tpl.ModTree.outer`.
&tplList - template for start items, after first search on page. Default `tpl.ModTree.itemList`.
&tplTree - template for childs branches on tree. Default `tpl.ModTree.itemTree`.
&tplSearchField - template for search fields. Default `tpl.ModTree.itemSearchField`.
&tplButtons - template for paginate buttons. Default `tpl.ModTree.paginateBtns`.

&sortBy. Default `menuindex`.
&sortDir. Default `ASC`.
&limit - limit on tree for child branches. Default `0`.
&limitList - limit for start search. Default `15`.

&contentIdPrefix - prefix of ID for content fields. Default `modtree-`, in case using two or more snippet on page. Fields can be placed anywhere on the page, even outside of the &tplOuter.
&customCss - Default 0 .If `1` - not linked component CSS. If you want to use your own styles you may disable component CSS.

Search parameters

&queryLinks. Determines the start search. `1` - related resources. `0` - child resources. Default `1`.
&parent. Resource for start search. Default current resource.
&queryForce. Determines whether to perform a start search. Default `1` - do start search, `0` - search only on search button click.
&linkWay. Link direction. `1` - master to slave. `-1` - slave to master. `0` - both way. Default `0`.
&searchFields. String with comma separator. Default `padetitle, content`. To disable - &searchFields=``