Can you disable the container on a preset layout?

Permalink
Hey all,

I'm migrating the companies template from Wordpress over to Concrete 5.7 and have come across a problem where my layout presets are automatically wrapped in

.container>.row>.col-xs-12

Similar to
$btIgnorePageThemeGridFrameworkContainer

on Blocks/Controllers, is it possible to disable this on layout presets?

I've tried looking around and it appears there isn't anyway to specify as part of the preset whether it should include a container or not?

Any suggestions?

Thanks

 
Steevb replied on at Permalink Reply
Steevb
R u using?:
<?php
$a = new Area('Main');
$a->enableGridContainer();
$a->display($c);
?>


Have u read:http://documentation.concrete5.org/developers/designing-for-concret...
MrKDilkington replied on at Permalink Reply
MrKDilkington
Hi gRoberts,

I believe you can enable and disable the grid container for blocks, custom layouts, and layout presets.

Click on a layout column area tab and choose Edit Layout Design from the popup menu. A new menu bar will appear, choose the gear icon "Custom CSS Classes, Block Name, Custom Templates and Reset Styles" on the right side. From the Block Container Class drop-down menu, select "Disable Grid Container".
gRoberts replied on at Permalink Reply
Hey all,

So I have
<?php
    $a = new Area('Content');
    $a->enableGridContainer(12);
    $a->display($c);
?>

which is within my template.

Even using the default bootstrap3 grid, clicking the <-> button doesn't toggle the width and I've only added the following as a page_theme (vanilla installation otherwise.)

<?php namespace Application\Theme\Navada;
use Concrete\Core\Page\Theme\Theme;
use Concrete\Core\Area\Layout\Preset\Provider\ThemeProviderInterface;
class PageTheme extends Theme implements ThemeProviderInterface {
    protected $pThemeGridFrameworkHandle = 'bootstrap3';
    public function getThemeAreaLayoutPresets()
    {
        $presets = array(
            array(
                'handle' => 'grid_row_1_2_1',
                'name' => 'Grid Row: 1-2-1',
                'container' => '<div class="grid-row row-1-2-1"></div>',
                'columns' => array(
                    '<div class="grid-box"></div>',
                    '<div class="grid-box"></div>',


Trying to find a CMS other than Wordpress that I can let my colleagues loose on and Concrete5 so far seems the best solution however just a little bit of a learning curve with situations like this ;)
gRoberts replied on at Permalink Reply
So... It turns out that by having the Bootstrap javascript already within your templates, it causes a few problems with the editor.

Seems that when I comment out my bootstrap javascript, I can now click on the options to toggle whether the layout should be contained or not.

One thing that would be useful is to be able to default to not having a container for presets.
MrKDilkington replied on at Permalink Reply
MrKDilkington
@gRoberts

When including the full Bootstrap JavaScript in your theme, you must register it in your theme page_theme.php registerAssets() method. If you don't, it will break the concrete5 interface.
$this->providesAsset('javascript', 'bootstrap/*');
gRoberts replied on at Permalink Reply
Thanks mate,

I had noticed that so kinda back up and running now.

Now all I need to do is work out if you can default a preset to insert without a grid instead of forcing people to opt-out.

Is this possible at the moment or do I need to look at implementing it and creating a PR?

thanks :)
MrKDilkington replied on at Permalink Reply
MrKDilkington
@gRoberts

I am not aware of a way to default layout presets to ignore the container.
Wallzii replied on at Permalink Reply
Does anyone know if this has changed since this post? This kind of functionality would be extremely useful.