{"id":15040420,"url":"https://github.com/inteve/navigation","last_synced_at":"2026-03-05T09:02:19.964Z","repository":{"id":56992761,"uuid":"64300464","full_name":"inteve/navigation","owner":"inteve","description":"Navigation component for Nette and more","archived":false,"fork":false,"pushed_at":"2025-07-01T10:19:57.000Z","size":90,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-28T08:06:08.668Z","etag":null,"topics":["breadcrumbs","navigation","nette","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/inteve.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":".github/funding.yml","license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"custom":"https://www.janpecha.cz/donate/"}},"created_at":"2016-07-27T10:43:13.000Z","updated_at":"2025-07-01T10:20:01.000Z","dependencies_parsed_at":"2025-07-01T10:22:09.522Z","dependency_job_id":"e882195c-d357-41d7-a937-47ca0711842d","html_url":"https://github.com/inteve/navigation","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/inteve/navigation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inteve%2Fnavigation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inteve%2Fnavigation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inteve%2Fnavigation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inteve%2Fnavigation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inteve","download_url":"https://codeload.github.com/inteve/navigation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inteve%2Fnavigation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30117480,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T08:19:04.902Z","status":"ssl_error","status_checked_at":"2026-03-05T08:17:37.148Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["breadcrumbs","navigation","nette","php"],"created_at":"2024-09-24T20:44:36.302Z","updated_at":"2026-03-05T09:02:19.681Z","avatar_url":"https://github.com/inteve.png","language":"PHP","funding_links":["https://www.janpecha.cz/donate/"],"categories":[],"sub_categories":[],"readme":"# Inteve\\Navigation\n\n[![Build Status](https://github.com/inteve/navigation/workflows/Build/badge.svg)](https://github.com/inteve/navigation/actions)\n[![Downloads this Month](https://img.shields.io/packagist/dm/inteve/navigation.svg)](https://packagist.org/packages/inteve/navigation)\n[![Latest Stable Version](https://poser.pugx.org/inteve/navigation/v/stable)](https://github.com/inteve/navigation/releases)\n[![License](https://img.shields.io/badge/license-New%20BSD-blue.svg)](https://github.com/inteve/navigation/blob/master/license.md)\n\nNavigation component for Nette Framework.\n\n\u003ca href=\"https://www.janpecha.cz/donate/\"\u003e\u003cimg src=\"https://buymecoffee.intm.org/img/donate-banner.v1.svg\" alt=\"Donate\" height=\"100\"\u003e\u003c/a\u003e\n\n\n## Installation\n\n[Download a latest package](https://github.com/inteve/navigation/releases) or use [Composer](http://getcomposer.org/):\n\n```\ncomposer require inteve/navigation\n```\n\n`Inteve\\Navigation` requires PHP 8.0 or later and Nette 2.2+ or 3.0+.\n\n\n## Usage\n\n### Define pages\n\n``` php\n\u003c?php\n\nuse Inteve\\Navigation\\Navigation;\n\n$navigation = new Navigation;\n$navigation-\u003eaddPage('/', 'Homepage');\n$navigation-\u003eaddPage('contact', 'Contact');\n$navigation-\u003eaddPage('news', 'News');\n$navigation-\u003eaddPage('news/2016', 'News 2016');\n$navigation-\u003eaddPage('news/2015', 'News 2015');\n\n$navigation-\u003esetDefaultPage('/');\n$navigation-\u003esetCurrentPage('news/2016');\n$navigation-\u003eisPageCurrent('news/2016'); // returns bool\n$navigation-\u003eisPageActive('news'); // returns bool\n```\n\n### Breadcrumbs\n\n``` php\n\u003c?php\n\n$navigation-\u003eaddItem('Detail');\n$navigation-\u003eaddItemBefore('/', 'My Website', ':Homepage:default');\n$navigation-\u003eaddItemAfter('news/2016', 'Page 1', ':News:default', array('page' =\u003e 1));\n$breadcrumbs = $navigation-\u003egetBreadcrumbs();\n```\n\n\n### Render menu\n\n``` php\n\u003c?php\n\nuse Inteve\\Navigation\\Navigation;\nuse Inteve\\Navigation\\MenuControl;\n\nclass NewsPresenter extends Nette\\Application\\UI\\Presenter\n{\n\t/** @var Navigation @inject */\n\tpublic $navigation;\n\n\n\tprotected function createComponentNewsMenu()\n\t{\n\t\t// render items 'News 2016' \u0026 'News 2015'\n\t\t$menu = new MenuControl($this-\u003enavigation);\n\t\t$menu-\u003esetSubTree('news');\n\t\treturn $menu;\n\t}\n\n\n\tprotected function createComponentSubMenu()\n\t{\n\t\t// Renders submenu by current page\n\t\t// for setCurrentPage('news') or setCurrentPage('news/any/thing') it renders items 'news/2016' \u0026 'news/2015'\n\t\t// for setCurrentPage('contact') it renders nothing\n\t\t$menu = new MenuControl($this-\u003enavigation);\n\t\t$menu-\u003esetSubTree('/');\n\t\t$menu-\u003esetSubLevel(1);\n\t\treturn $menu;\n\t}\n}\n```\n\nIn Latte template:\n\n```latte\n{control newsMenu}\n```\n\n\n### Render breadcrumbs\n\n``` php\n\u003c?php\n\nuse Inteve\\Navigation\\Navigation;\nuse Inteve\\Navigation\\BreadcrumbsControl;\n\nclass Presenter extends Nette\\Application\\UI\\Presenter\n{\n\t/** @var Navigation @inject */\n\tpublic $navigation;\n\n\n\tprotected function createComponentBreadcrumbs()\n\t{\n\t\treturn new BreadcrumbsControl($this-\u003enavigation);\n\t}\n}\n```\n\nIn Latte template:\n\n```latte\n{control breadcrumbs}\n```\n\n------------------------------\n\nLicense: [New BSD License](license.md)\n\u003cbr\u003eAuthor: Jan Pecha, https://www.janpecha.cz/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finteve%2Fnavigation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finteve%2Fnavigation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finteve%2Fnavigation/lists"}