When you are in a module template, you may call the breadcrumbs using the {'.$modulename.'_breadcrumbs} tag. You may use the same parameters as the cms core breadcrumbs tag (initial, delimiter, classid, currentclassid), as well as the "startlevel" parameter. Outside module templates, anywhere on the page, you may call the breadcrumbs action {cms_module module="'.$modulename.'" action="breadcrumbs"}, once again using the same parameters.
This module manages and displays an item catalogue.
Make sure your users have the appropriate permissions. If you are not using the access restriction option (see settings), the \"'.$modulename.': Normal user\" permission will be enough to use the module. In the settings tab, you can choose which tabs will be displayed for the normal user. Only the administrator and users with the \"'.$modulename.': Advanced\" permission will have access to settings tab. If you wish to define level-specific permissions, activate the access restriction option in the settings tab and give the \"'.$modulename.': Manage name_of_level\" permission to the appropriate users.
To call the module, simply use the following tag: {cms_module module=\"'.$modulename.'\"}
In this case the list of the last level elements ('.$finallevel.') will be displayed. To select a level, use the \"what\" parameter: {cms_module module=\"'.$modulename.'\" what=\"'.$finallevel.'\"} The possible values for the \"what\" parameter are : '.$levelnames.'
You may also ask for elements who belong to a specific parent: {cms_module module=\"'.$modulename.'\" parent=\"alias_of_parent\"}
You may finally ask for a specific element: {cms_module module=\"'.$modulename.'\" alias=\"alias_of_item\"}
You may limit the number of items to be shown on one page: {cms_module module=\"'.$modulename.'\" nbperpage=\"5\"} In the template, you can build the page menu using the following tags: {".\'$\'."page_showing}, {".\'$\'."page_totalitems}, {".\'$\'."page_pagenumbers}, {".\'$\'."page_next}, {".\'$\'."page_previous}
To get a list of item that meet specific criteria, you can create a query using the queries tab of the admin panel, and call them using the \"query\" parameter: {cms_module module=\"'.$modulename.'\" query=\"5\"}
If the option to allow manuel sql queries is enabled (see \"Settings\" tab), you may also provide the sql query directly with the query parameter. For example: {cms_module module=\"'.$modulename.'\" what=\"'.$finallevel.'\" query=\"A.date_modified > \'2009-03-15\' AND A.active = 1\"} The query parameter can only hold the WHERE clause of the query, and should not include the WHERE command itself. To avoid problems, the prefix \"A.\" should be used before field names (where applicable, the \"B.\" prefix can be used to specify criteria on the parent\'s fields). Although the abstraction layer is not easily prone to injections, remember that activating this option means giving a sql opening within the templates and be careful.
You may use the action \"link\" to create a link to the default action, using the same parameters: {cms_module module=\"'.$modulename.'\" action=\"link\" what=\"'.$finallevel.'\" random=\"1\"} would create a link to a random element of this level.
If your module is not sharing children, you may use the action \"sitemap\" to create a module sitemap: {cms_module module=\"'.$modulename.'\" action=\"sitemap\"} You can select the levels using the \"what\" parameter, and may select more than one using \"|\" : what=\"level1|level2\". Other available parameters for this action are \"detailpage\" and \"inline\". To create a google sitemap, see the FAQ.
A form for the frontend edition of elements can be called using: {cms_module module=\"'.$modulename.'\" action=\"frontend_edit\" what=\"'.$finallevel.'\"} This tag would show an empty form, and create a new element of the level \"'.$finallevel.'\". In order to edit an existing element, you simply have to specify the alias: {cms_module module=\"'.$modulename.'\" action=\"frontend_edit\" what=\"'.$finallevel.'\" alias=\"item_alias\"}
If you wish to display a link to the edition of an item, use the \"link\" action: {cms_module module=\"'.$modulename.'\" action=\"link\" toaction=\"frontend_edit\" what=\"'.$finallevel.'\" alias=\"item_alias\"} You could, for example, do this in a list template...
(See the settings tab for options about the frontend_edit feature) It is recommanded that the frontend edit feature be used with the Front End Users module for permissions management. See FAQ for more information on how to do this.
You may use the action \"search\" to display a search form: {cms_module module=\"'.$modulename.'\" action=\"search\"} Use the \"searchmode\" parameter to switch between advanced (default) and simple mode. You may specify the level in which to search using the \"what\" parameter. You cannot use the advanced search mode in all levels at the same time. The following parameters can be used with the search action: what, limit, nbperpage, orderby, detailpage, listtemplate, inline, searchmode. See '.$modulename.'/templates/search.tpl to modify the search form.
For more help, you may take a look at the FAQ.
This module has been created with CTLModuleMaker, and is released under the GNU Public License.