Homepage
Main navigation
Main content
Additional information
October Tricks
Login / Sign up
Quality Guidelines
About
GitHub
Propose new content
October CMS resources and help articles
Simple and to the point. Optimized by the community.
×
Login / Sign up
Quality Guidelines
About
GitHub
Propose new content
Edit trick
Changes will be published after manual review
Title
Give your trick a describing title. Do
not
start with «How to...».
Your trick
Keep it short and concise! Markdown is supported.
To use the `{% framework extras %}` in your backend you have to include the CSS and JS files in your Controller. ```php class YourController extends Controller { public $implement = [ 'Backend.Behaviors.FormController', 'Backend.Behaviors.ListController', ]; public $formConfig = 'config_form.yaml'; public $listConfig = 'config_list.yaml'; public function __construct() { parent::__construct(); BackendMenu::setContext('YourVendor.YourPlugin', 'your-main-menu', 'your-sub-menu'); // Include framework extras. $this->addJs('/modules/system/assets/js/framework.extras.js'); $this->addCss('/modules/system/assets/css/framework.extras.css'); } ``` If you don't need the extras on every page the Controller handles, you can of course also add them to the `update` or `create` method only. If you need the extras on every page in the backend, you can add the JS file and CSS file by using events. Add the following code to the `boot` method of your `Plugin.php` file. ```php Event::listen('backend.page.beforeDisplay', function ($controller, $action, $params) { $controller->addJs('/modules/system/assets/js/framework.extras.js'); $controller->addCss('/modules/system/assets/css/framework.extras.css'); }); ```
References
Add additional online resources to your trick
+ Add reference
Topics
If your trick fits more than one topic select multiple. Select at least one.
Backend
Plugin Development
CMS
Twig
Themes
Deployment
Tags
You can use existing tags or create new ones. Add at least one.
Submit for review
Cancel
We use cookies to measure the performance of this website. Do you want to accept these cookies?
Accept
Decline