marko/admin-panel-twig
Twig templates for marko/admin-panel --- provides the login, dashboard, layout, and partial views rendered by the Twig engine. Installing this package is all that is needed to supply admin panel templates when using marko/view-twig; no additional configuration is required.
Installation
Section titled “Installation”composer require marko/admin-panel-twigRequires marko/admin-panel and marko/view-twig.
Install the package alongside marko/admin-panel and marko/view-twig:
composer require marko/admin-panel marko/admin-panel-twig marko/view-twigTemplates are discovered automatically via the extra.marko.templates_for declaration in the package’s composer.json. The admin-panel:: template namespace resolves to the views in this package --- for example, admin-panel::dashboard/index renders resources/views/dashboard/index.twig.
Provided Templates
Section titled “Provided Templates”| Template name | File |
|---|---|
admin-panel::auth/login | resources/views/auth/login.twig |
admin-panel::layout/base | resources/views/layout/base.twig |
admin-panel::dashboard/index | resources/views/dashboard/index.twig |
admin-panel::partials/sidebar | resources/views/partials/sidebar.twig |
admin-panel::partials/flash | resources/views/partials/flash.twig |
Overriding Templates
Section titled “Overriding Templates”Override any template by placing a file with the same path under your own module’s resources/views/admin-panel/ directory:
mymodule/ resources/ views/ admin-panel/ dashboard/ index.twig # Overrides the default dashboardRelated Packages
Section titled “Related Packages”marko/admin-panel--- admin panel logic and routesmarko/admin-panel-latte--- Latte template alternativemarko/view-twig--- Twig rendering engine