I am completely new to concretecms, but I really like it so far
I am trying to port a uikit css (https://getuikit.com) based html site to concretecms.
Unfortunately I am struggling with my custom layouts.
The createy layout seems to nest columns into a main column for whatever reason.
The slider used to change the colum size is not working. Do I need to include special js for this to work?
I’m not sure I can add much to help, other than to say that I’ve also struggled with getting this grid layout tool to work reliably with custom CSS grids.
I have got it to work ok with a custom grid, but I had to still use containers and a row class, the controls expect those things to be there.
It would still occasionally get confused, and you’d have to refresh the page to reset the handles.
More recently I’ve ended up just using Bootstrap’s CSS grid in our custom Sass projects, just for a bit more compatibility, and to make these controls work reliably. Ok for what we’re doing, very clumsy if you’re wanting to use something like UIKit by itself.
So I don’t believe you’re missing anything, you just might need to get creative with a way to approach it, where you still have rows and containers… be prepared that it might not be possible with UIKit…
Thanks for your answer.
This is very sad to hear
I hoped it was easily possible to port some of my themes to concrete, but it seems like it is very hard to use something else than concrete’s bedrock css
The Modena theme uses a custom grid and handles layouts. There are also some foundation based themes. So I don’t think that is a generic issue. But perhaps an issue with some grids that don’t follow the assumed container/row/column nesting pattern.
You could perhaps use some containers (the Concrete component called Container) to make up for difficulties with layouts.
I copied the Bootstrap5 class and changed the pieces to accomodate the uikit markup.
But creating the layout results in broken width-sliders which break the theme completely when I save.
If anyone stumbles accross a similar issue in the future, here are the relavant basic things to make a custom UiKit based GridFramework work:
public function getPageThemeGridFrameworkRowStartHTML()
{
return '<div class="uk-grid">';
}
public function getPageThemeGridFrameworkRowEndHTML()
{
return '</div>';
}
public function getPageThemeGridFrameworkContainerStartHTML()
{
return '<div class="uk-container">';
}
public function getPageThemeGridFrameworkContainerEndHTML()
{
return '</div>';
}
public function getPageThemeGridFrameworkColumnClasses()
{
$columns = array(
'uk-width-1-6',
'uk-width-1-3',
'uk-width-1-2',
'uk-width-2-3',
'uk-width-5-6',
'uk-width-1-1',
);
return $columns;
}