Layout control

Permalink
Hi everybody

I would like to obtain more control over the layout containers added through the "Add layout"-option. If I am not completely wrong, c5 adds col-md-* classes only. Is there a way to inject the col-sm-* (or other classes) as well? I would like to offer my client a pre-built 3-column-layout that respects styling for small screens as well ....

pixeljunkie
View Replies:
MrKDilkington replied on at Permalink Reply
MrKDilkington
Hi pixeljunkie,

The default Elemental theme uses Bootstrap 3 and uses the col-sm-* grid class.

If you want specific layouts and classes, you can use custom layout presets.
http://documentation.concrete5.org/developers/designing-for-concret...
pixeljunkie replied on at Permalink Reply
pixeljunkie
Hi Karl
Thanks for your reply. This is exactly what I am looking for. There is just one thing I do not quite (yet) understand:

lewismcarey points to the fact that it is necessary to include

use Concrete\Core\Area\Layout\Preset\Provider\ThemeProviderInterface;
class PageTheme extends Theme implements ThemeProviderInterface { ...
in the page_theme.php.

However, my custom-built theme already includes:

use Concrete\Core\Page\Theme\Theme;
class PageTheme extends Theme {


Thus, I am not quite sure where to put it.
MrKDilkington replied on at Permalink Reply
MrKDilkington
@pixeljunkie

You would keep your current namespace and replace the rest (use statement and extended class). An example is the page_theme.php in the default Elemental theme.
https://github.com/concrete5/concrete5/blob/develop/web/concrete/the...
pixeljunkie replied on at Permalink Reply
pixeljunkie
That did the job! Thanks a lot!