Complex Custom Layout Presets
Permalink 2 users found helpful
The custom grid layout does not show up in the layout dropdown menu. I have implemented the custom grid in to the theme. By adding code to the PageTheme class in page_theme.php
I also tried to delete and reinstall the theme but it still does not work.
Any idea what I should do?
//this is the code from the elemental theme public function getThemeAreaLayoutPresets() { $presets = array( array( 'handle' => 'left_sidebar', 'name' => 'Left Sidebar', 'container' => '<div class="row"></div>', 'columns' => array( '<div class="col-sm-4"></div>', '<div class="col-sm-8"></div>' ), ), array( 'handle' => 'right_sidebar',
Viewing 15 lines of 25 lines. View entire code block.
I also tried to delete and reinstall the theme but it still does not work.
Any idea what I should do?
I'm having problems including the ThemeProviderInterface; to page_theme.php without getting syntax errors. Here's what my page_theme.php looks from the beginning:
Could anyone give advice where to include the code in the reply above?
<?php namespace Application\Theme\Redox; class PageTheme extends \Concrete\Core\Page\Theme\Theme { /* layout tool preset */ public function getThemeAreaLayoutPresets() { $presets = array( array( 'handle' => 'small_two_large_four', 'name' => 'Small Two Large Four', 'container' => '<div class="row"></div>', 'columns' => array( '<div class="col-sm-6 col-md-3"></div>', '<div class="col-sm-6 col-md-3"></div>', '<div class="col-sm-6 col-md-3"></div>',
Viewing 15 lines of 22 lines. View entire code block.
Could anyone give advice where to include the code in the reply above?
Hi,
This should work.
This should work.
<?php namespace Application\Theme\Redox; use Concrete\Core\Page\Theme\Theme; use Concrete\Core\Area\Layout\Preset\Provider\ThemeProviderInterface; class PageTheme extends Theme implements ThemeProviderInterface { /* layout tool preset */ public function getThemeAreaLayoutPresets() { $presets = array( array( 'handle' => 'small_two_large_four', 'name' => 'Small Two Large Four', 'container' => '<div class="row"></div>', 'columns' => array(
Viewing 15 lines of 25 lines. View entire code block.
Thousand thanks!
It is simple when you know what to do... ;)
It is simple when you know what to do... ;)
Thank you aswell.
One problem though, how do you add "data-equalizer" to the container?
'container' => '<div class="row" data-equalizer></div>', won't work.
Hope its possible.
One problem though, how do you add "data-equalizer" to the container?
'container' => '<div class="row" data-equalizer></div>', won't work.
Hope its possible.
Fiuu, thanks for that. You saved me from a major headache.
And yes, the documentation is still not a jour with this.
And yes, the documentation is still not a jour with this.
I Guess the documentation about this is not complete.
http://www.concrete5.org/documentation/developers/5.7/designing-for...