{"id":14971305,"url":"https://github.com/mikbox74/yii2-chl","last_synced_at":"2025-10-03T21:54:53.128Z","repository":{"id":62528601,"uuid":"124928683","full_name":"mikbox74/yii2-chl","owner":"mikbox74","description":"Yii2 extension for Chaldene Admin Template","archived":false,"fork":false,"pushed_at":"2019-04-29T22:12:35.000Z","size":220,"stargazers_count":5,"open_issues_count":9,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-31T20:55:50.565Z","etag":null,"topics":["admin-template","bootstrap-template","chaldene","css3","html-template","php","theme","yii2","yii2-chaldene","yii2-extension","yii2-widgets"],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/mikbox74.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2018-03-12T17:50:09.000Z","updated_at":"2020-10-23T15:44:07.000Z","dependencies_parsed_at":"2022-11-02T14:17:24.344Z","dependency_job_id":null,"html_url":"https://github.com/mikbox74/yii2-chl","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikbox74%2Fyii2-chl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikbox74%2Fyii2-chl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikbox74%2Fyii2-chl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikbox74%2Fyii2-chl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikbox74","download_url":"https://codeload.github.com/mikbox74/yii2-chl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238347897,"owners_count":19457012,"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":["admin-template","bootstrap-template","chaldene","css3","html-template","php","theme","yii2","yii2-chaldene","yii2-extension","yii2-widgets"],"created_at":"2024-09-24T13:44:59.930Z","updated_at":"2025-10-03T21:54:53.068Z","avatar_url":"https://github.com/mikbox74.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Yii2 extension for Chaldene Admin Template\n=====================================\n\nThe extension adds support for the [Chaldene Admin Template](http://chl.onokumus.com/) markup.\n\nThis extension includes easy applicable asset bundles, HTML layouts and basic widgets.\n\nInstallation\n---\nYour best CLI-friend will help you with this:\n\n`composer require mikbox74/yii2-chl`\n\nStarting the party\n---\n\nFor beginning you must configure `view` component:\n\n```php\nreturn [\n    //...\n    'components' =\u003e [\n        'view' =\u003e [\n            'class'   =\u003e \\mikbox74\\Chaldene\\ChaldeneView::class,\n            //...\n        ],\n    ],\n    //...\n];\n```\n\nThe `mikbox74\\Chaldene\\ChaldeneView` overrides system layout path and makes some nice magic. For more magic you can use following properties:\n\n*   *layout* (string) - one of the three layout types: `topnav` (main menu on top), `sidenav`, `sidenavhf` (main menu at left). It's strongly recommended to use suitable constants from `mikbox74\\Chaldene\\ChaldeneLayouts`.\n*   *fixPage* (boolean) - makes `app heading` and `app footer` fixed while you scroll the page.\n*   *fixSide* (boolean) - makes `side heading`, `side footer`, `app heading` and `app footer` fixed while you scroll the page.\n*   *fixMain* (boolean) - makes `main heading`, `main footer`, `app heading` and `app footer` fixed while you scroll the page.\n*   *boxed* (boolean) - limits the width of the page.\n*   *showTitle* (boolean) - Show the page title inside `main heading` panel.\n*   *rtl* (boolean) - Right to left content direction.\n*   *widgets* (array) - Config array where in you can explain how some widgets must be placed inside the view.\n\nThemization\n---\n**Since 1.1.6:**\n\nLook inside `mikbox74\\Chaldene\\ChaldeneThemes` to use its constants:\n```php\nreturn [\n    //...\n    'components' =\u003e [\n        'view' =\u003e [\n            'class'   =\u003e \\mikbox74\\Chaldene\\ChaldeneView::class,\n            'colorTheme' =\u003e \\mikbox74\\Chaldene\\ChaldeneThemes::PETER_RIVER,\n            //...\n        ],\n    ],\n    //...\n];\n```\n\n**Before 1.1.6:**\n\nYou can set one of these by configuring the `assetManager` component. Example:\n\n```php\nreturn [\n    //...\n    'components' =\u003e [\n        'view' =\u003e [\n            'class'   =\u003e \\mikbox74\\Chaldene\\ChaldeneView::class,\n            //...\n        ],\n        'assetManager' =\u003e [\n            'class' =\u003e \\yii\\web\\AssetManager::class,\n            'bundles' =\u003e [\n                \\mikbox74\\Chaldene\\Assets\\ChaldeneAsset::class =\u003e [\n                    'theme' =\u003e \\mikbox74\\Chaldene\\ChaldeneThemes::PETER_RIVER,\n                ],\n            ],\n        ],\n    ],\n    //...\n];\n```\nThemes do not differ much from each other but may be you will like this feature ;)\n\nMore about widgets placement\n---\nI recommend to set up widgets in special file:\n\n\n```php\nreturn [\n    //...\n    'components' =\u003e [\n        'view' =\u003e [\n            'class'   =\u003e \\mikbox74\\Chaldene\\ChaldeneView::class,\n            'widgets' =\u003e require 'widgets.php',\n        ],\n    ],\n    //...\n];\n```\n\nwidgets.php:\n\n```php\nreturn [\n    'app-logo' =\u003e [\n        'widget1',\n        'widget2',\n        'widget3',\n        //...\n    ],\n    'mainmenu' =\u003e [\n        'widget1',\n        'widget2',\n        'widget3',\n        //...\n    ],\n    'app-search' =\u003e [\n        //...\n    ],\n    //...\n];\n```\n\nThe first level is an associative array with the pairs 'place name' =\u003e 'widgets list in this place'.\n\nThe template has following places:\n\n*  app-logo\n*  mainmenu\n*  app-search\n*  app-nav\n*  dashhead-subtitle\n*  dashhead-toolbar\n*  before-content\n*  after-content\n*  main-footer\n*  app-footer\n*  side-heading (only `sidenav` and `sidenavhf` layouts)\n*  side-footer (only `sidenav` and `sidenavhf` layouts)\n*  mobile-search (visible on small screens after pushing search button)\n\nNext level is the plain list of widgets. Every widget can be configured by three ways:\n\n1. Plain text string. It will be placed right inside without any changing.\n2. Configuration array with 'class' element and any properties of the specified class (Yii-way).\n3. Anonimous function returns a class configuration array (like above).\n\nIn brief about widgets\n---\n\n*  `mikbox74\\Chaldene\\Widgets\\AlertNavitem` - created to view some important information with icon, badge and dropdown list of messages. Add it in place inside _UL_ menu and be happy.\n*  `mikbox74\\Chaldene\\Widgets\\Box` - views content inside nice blocks (same as TWBS panes but little mode advanced).\n*  `mikbox74\\Chaldene\\Widgets\\Breadcrumbs` - crumbles everywhere on your site.\n*  `mikbox74\\Chaldene\\Widgets\\Logo` - shows your (or our) logo image in two wariants: small for mobiles and larger for other screens.\n*  `mikbox74\\Chaldene\\Widgets\\Message` - a twin of `\\common\\widgets\\Alert` from the Yii2-advanced app skeleton. It appears automatically and not need to be added in any place.\n*  `mikbox74\\Chaldene\\Widgets\\MetisMenu` - this is the pop king in town. Add it wherever in you want to see awesome adaptive multilevel menu.\n*  `mikbox74\\Chaldene\\Widgets\\SearchForm` - simple little search form with input and knob.\n*  `mikbox74\\Chaldene\\Widgets\\UserNavitem` - can view a nav item with user avatar, username and dropdown user menu. Works properly inside *UL* tag (same as `AlertNavitem`)\n\nMuch more info see in DocComments.\n\nAnd... Killer feature: decoratos!\n---\n\nSince 1.1.0 each widget from the package has a string propery `decorator`.\nYou can use it to specify path to any decorator file you want ([see somthing about ContentDecorator](https://www.yiiframework.com/doc/api/2.0/yii-widgets-contentdecorator) to get how it works). For example you can create file `@common/views/decorators/example.php`:\n\n```\n\u003cdiv style=\"border: 1px solid red; background: pink;\"\u003e\n    \u003c?= $content?\u003e\n\u003c/div\u003e\n```\nand set the path as `decorator` for any widget.\n\nHandsome cheatsheet\n---\n\n### Top navigation ###\n\n![cheatsheet 1](docs/widgets1.png)\n\n### Side navigation ###\n\n![cheatsheet 2](docs/widgets2.png)\n\n### Mobile search ###\n\n![cheatsheet 3](docs/widgets3.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikbox74%2Fyii2-chl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikbox74%2Fyii2-chl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikbox74%2Fyii2-chl/lists"}