{"id":17148822,"url":"https://github.com/trustmaster/cot-navi","last_synced_at":"2025-06-25T10:31:50.644Z","repository":{"id":25870046,"uuid":"29310096","full_name":"trustmaster/cot-navi","owner":"trustmaster","description":"Category navigation menu builder widget for Cotonti","archived":false,"fork":false,"pushed_at":"2015-01-15T18:21:46.000Z","size":100,"stargazers_count":0,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-29T16:44:12.981Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trustmaster.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-15T17:54:18.000Z","updated_at":"2015-01-15T18:22:16.000Z","dependencies_parsed_at":"2022-08-24T14:16:04.386Z","dependency_job_id":null,"html_url":"https://github.com/trustmaster/cot-navi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trustmaster%2Fcot-navi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trustmaster%2Fcot-navi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trustmaster%2Fcot-navi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trustmaster%2Fcot-navi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trustmaster","download_url":"https://codeload.github.com/trustmaster/cot-navi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245265900,"owners_count":20587409,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T21:29:57.861Z","updated_at":"2025-03-24T11:41:12.736Z","avatar_url":"https://github.com/trustmaster.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Navigation Builder\n\nBuilds category structure menus in Cotonti templates\n\n## List menu\n\nUse this widget to build a flat list:\n\n```php\nfunction navi_list($tpl = 'navi.list', $parent = '', $current = '', $count = 1, $sort = 'path', $blacklist = '', $whitelist = '')\n```\n\n### Parameters\n\n * `$tpl` (string) - TPL file name without extension, e.g. 'navi.list' =\u003e 'navi.list.tpl'\n * `$parent` (string) - Parent category code for the list. Empty to start at structure root. Accepts special keywords:\n   * `__parent__` =\u003e parent category of $current,\n   * `__root__` =\u003e select root-level categories\n * `$current` (string) - Category code that is marked in the list as current, optional\n * `$count` (integer) - Count items. `1` = yes (default), `0` = no (optimized speed)\n * `$sort` (string) - Sort by: `path` (default) or `title` (optional)\n * `$blacklist` (string) - Category codes black list, separated by `;` (optional)\n * `$whitelist` (string) - Category codes white list, separated by `;` (optional)\n\n### TPL usage example\n\n```html\n{PAGE_CAT|navi_list('my_menu', '__parent__', $this, 1)}\n```\n\n### Template customization\n\nCopy the `navi/tpl/navi.list.tpl` to your theme and customize it to fit your site. Pass customized template name (without extension) as the first argument of the widget function.\n\n## Tree menu\n\nUse `navi_tree` function to generate a nested menu containing categories, subcategories, etc.\n\n```php\nfunction navi_tree($tpl = 'navi.tree', $root = '', $current = '', $depth = 1, $full = 0, $show_root = 0, $siblings = 0, $count = 1, $blacklist = '', $whitelist = '')\n```\n\n### Parameters\n\n * `$tpl` (string) - TPL file name without extension, e.g. 'navi.tree' =\u003e 'navi.tree.tpl'\n * `$root` (string) - Root category code for the tree. Empty to start at structure root. Accepts special keywords:\n   * `__parent__` =\u003e parent category of $current,\n   * `__root__` =\u003e select root-level categories\n * `$current` (string) - Category code that is marked in the list as current, optional\n * `$depth` (integer) - Max. depth from root, `0` = unlimited. Default is `1`.\n * `$full` (integer) - Show full tree. `1` = open all tree nodes, `0` = show only current branch (default)\n * `$show_root` (integer) - Show root element, `1` = yes, `0` = no (default)\n * `$siblings` (integer) - Show root's siblings, `1` = yes, `0` = no (default)\n * `$count` (integer) - Count items. `1` = yes (default), `0` = no (optimized speed)\n * `$sort` (string) - Sort by: `path` (default) or `title` (optional)\n * `$blacklist` (string) - Category codes black list, separated by `;` (optional)\n * `$whitelist` (string) - Category codes white list, separated by `;` (optional)\n\n### TPL usage example\n\n```html\n{PAGE_CAT|navi_list('tree_menu', '__root__', $this, 3, 1, 1, 1)}\n```\n\n### Template customization\n\nCopy the `navi/tpl/navi.tree.tpl` to your theme and customize it to fit your site. Pass customized template name (without extension) as the first argument of the widget function.\n\nNote that default template only supports up to 3 levels of nesting. You can add more levels but you should code it in the TPL file similarly to the existing levels.\n\n## Tabular menu\n\nYou can create 2-dimensional table of site categories with this function:\n\n```php\nfunction navi_table($tpl = 'navi.table', $parent = '', $current = '', $count = 1, $sort = 'path', $blacklist = '', $whitelist = '')\n```\n\n### Parameters\n\n * `$tpl` (string) - TPL file name without extension, e.g. 'navi.table' =\u003e 'navi.table.tpl'\n * `$parent` (string) - Parent category code for the list. Empty to start at structure root. Accepts special keywords:\n   * `__parent__` =\u003e parent category of $current,\n   * `__root__` =\u003e select root-level categories\n * `$current` (string) - Category code that is marked in the list as current, optional\n * `$count` (integer) - Count items. `1` = yes (default), `0` = no (optimized speed)\n * `$sort` (string) - Sort by: `path` (default) or `title` (optional)\n * `$blacklist` (string) - Category codes black list, separated by `;` (optional)\n * `$whitelist` (string) - Category codes white list, separated by `;` (optional)\n\n### TPL usage example\n\n```html\n{PAGE_CAT|navi_table('my_menu', '__parent__', $this, 1)}\n```\n\n### Template customization\n\nCopy the `navi/tpl/navi.table.tpl` to your theme and customize it to fit your site. Pass customized template name (without extension) as the first argument of the widget function.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrustmaster%2Fcot-navi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrustmaster%2Fcot-navi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrustmaster%2Fcot-navi/lists"}