Create your own template
What the best way to custom your own Laravel CMS blade template? Short words: Copy & Paste & Change.
The following steps will show you how to create your own frontend template:
- The default frontend blade template folder is your-laravel-project/resources/views/vendor/laravel-cms/frontend
- Copy this frontend folder to another folder with a different name, eg. new-template-2020 (Keep the old one for compare & switch )
- Custom & design your own blade.php template files and put them in the folder new-template-2020/
- Change theme_name and blade_files in the new-template-2020/config.php , those fields will show on the backend setting page
- Go to the backend CMS setting page & individual page setting section, choose your new template and test it.
Some notes:
- Do not change the files in your-laravel-project/resources/views/vendor/laravel-cms/frontend, as it may override when upgrading the CMS.
- Please use pure English letters for the template folder name, no space, and no special characters.
- Please keep the *.blade.php filename the same if you want to smoothly switch from different templates/themes.
Content page variables
Move your mouse to the label of the input field, it will display the usage help text. Normally, The usage of text input or text area input are {{ $page->field_name }}, exam...
Menu variables
Menu variables examples: resources\views\frontend\includes\header.blade.phpClick here to display a JSON API DATA from our website, it will show you all the available me...
Setting variables
How to use the variables/parameters of the CMS settings?Usage: $helper->s("category.parameter_name"){{ $helper->s("global.page_top") }} or {{ $helper->s("page_t...
Meaning of the template/config.php
What the meaning of the template-folder/config.php:theme_name: template name, it will display on the CMS setting page for choosing a templateblade_files: Please specify each blade...