{"id":17987396,"url":"https://github.com/eseperio/yii2-bigmenu-widget","last_synced_at":"2025-03-25T22:32:00.589Z","repository":{"id":56225631,"uuid":"102298602","full_name":"Eseperio/yii2-bigmenu-widget","owner":"Eseperio","description":"A pure css multilevel menu with dynamic content.","archived":false,"fork":false,"pushed_at":"2022-03-03T10:53:33.000Z","size":418,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-16T03:16:58.191Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"SCSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Eseperio.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-03T22:39:28.000Z","updated_at":"2025-03-06T22:53:51.000Z","dependencies_parsed_at":"2022-08-15T15:00:48.509Z","dependency_job_id":null,"html_url":"https://github.com/Eseperio/yii2-bigmenu-widget","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eseperio%2Fyii2-bigmenu-widget","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eseperio%2Fyii2-bigmenu-widget/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eseperio%2Fyii2-bigmenu-widget/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eseperio%2Fyii2-bigmenu-widget/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Eseperio","download_url":"https://codeload.github.com/Eseperio/yii2-bigmenu-widget/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245555034,"owners_count":20634666,"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-29T19:08:41.608Z","updated_at":"2025-03-25T22:32:00.276Z","avatar_url":"https://github.com/Eseperio.png","language":"SCSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Yii2 bigmenu widget. Multilevel menu, PURE CSS\n\n\u003e Any code contribution is welcome\n\nBigmenu renders a PURE CSS multilevel menu with advanced functions. It works like default nav widget, but dropdowns are\npure css. It also **allows large menu items loaded vía ajax** using `page` parameter. It has no limit on levels, but be\ncareful. A lot of levels are uncomfortable for users.\n\n## Installation\n\n`composer require eseperio/yii2-bigmenu-widget`\n\nWhen an item have `page` property and `items`, the first one will be available on medium-large devices meanwhile on\nsecond will be available on mobile devices.\n\n[Screenshots](#screenshots)\n\n ```php\n   echo Bigmenu::widget([\n       'items' =\u003e [\n           [\n               'label' =\u003e 'Home',\n               'url' =\u003e ['site/index'],\n               'linkOptions' =\u003e [...],\n           ],\n           [\n               'label' =\u003e 'Multilevel',\n               'items' =\u003e [\n                    ['label' =\u003e 'Level 1 - Dropdown A', 'url' =\u003e '#'],\n                    '\u003cli class=\"divider\"\u003e\u003c/li\u003e',\n                    '\u003cli class=\"dropdown-header\"\u003eDropdown Header\u003c/li\u003e',\n                    ['label' =\u003e 'Level 1 - Dropdown B', 'url' =\u003e '#'],\n               ],\n           ],\n           [\n               'label' =\u003e 'Login',\n               'url' =\u003e ['site/login'],\n               'visible' =\u003e Yii::$app-\u003euser-\u003eisGuest\n           ],\n           [\n               'label' =\u003e 'Login',\n               'url' =\u003e ['site/login'],\n               'visible' =\u003e Yii::$app-\u003euser-\u003eisGuest,\n               'page' =\u003e ['site/menu']\n           ],\n       ],\n       'options' =\u003e ['class' =\u003e'nav-pills'], // set this to nav-tab to get tab-styled navigation\n       'jsOptions' =\u003e ['widthToEnableResponsive'=\u003e 768], // set this to override the options used in js\n   ]);\n   ```\n\n## How to use\n\nThis widget is based on yii/bootstrap/nav\nwidget [yii\\bootstrap\\nav](http://www.yiiframework.com/doc-2.0/yii-bootstrap-nav.html). The main differences are:\n\n1. Allows infinite multilevel. For a better usability don´t use more than 3 levels.\n2. Allow render a page as a menu panel. With this you are free to make complex and advanced dropdowns menus.\n3. Render of pages in menu is made with ajax, and only one request is made per panel.\n\nTo use as simple multilevel pass an array to `items` property. See `yii\\bootstrap\\nav` documentation.\n\n### Dynamic panels\n\nTo use dynamic panels add to the menu item the property \"page\". This must be a link to the action that renders the page.\n\n```\nBigmenu::widget([\n   'hamburger' =\u003e \"slide\",\n   'items' =\u003e [\n      ['label'=\u003e\"Dynamic content\", \"url\"=\u003e[\"site/index\"], \"page\"=\u003e[\"site/samplemenupage\"] ],\n      ...\n   ]\n])\n```\n\nIn your controller use eseperio\\yii2-bigmenu\\widget\\BigmenuTrait. Then in your action, to render content\ncall `$this-\u003erenderBigmenu($view,$options)`.\n\nNote: The trait only simplifies the task of differenciating render method, between `render` and `renderAjax`. So you can\ndo this in your own controller if you don´t want to use traits.\n\n## Change hamburger\n\nThis widget implements [Hamburgers by jonsuh](https://jonsuh.com/hamburgers/). You can change the hamburger like this\n\n```\nBigmenu::widget([\n   'hamburger' =\u003e \"slide\",\n   'items' =\u003e [...]\n])\n```\n\n## Change width to enable responsive\n\nIf you want custom the with of the responsive devise, you must set the property jsOptions\n\n```\nBigmenu::widget([\n  'jsOptions' =\u003e ['widthToEnableResponsive'=\u003e 992],\n   'items' =\u003e [...]\n])\n```\n\n## Screenshots\n\nThis first screenshot shows a view rendered and loaded vía ajax automatically with this widget.\n![Bigmenu screenshot](https://github.com/Eseperio/yii2-bigmenu-widget/blob/master/Captura%20de%20pantalla%202017-09-04%20a%20las%201.32.02.png?raw=true)\n![Bigmenu screenshot](https://github.com/Eseperio/yii2-bigmenu-widget/blob/master/Captura%20de%20pantalla%202017-09-04%20a%20las%201.31.54.png?raw=true)\nMobile friendly\n![Bigmenu screenshot](https://github.com/Eseperio/yii2-bigmenu-widget/blob/master/Captura%20de%20pantalla%202017-09-04%20a%20las%201.33.08.png?raw=true)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feseperio%2Fyii2-bigmenu-widget","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feseperio%2Fyii2-bigmenu-widget","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feseperio%2Fyii2-bigmenu-widget/lists"}