Custom Classes for Blocks
PermalinkThis is my code ... what have I done wrong? These classes ARE in my stylesheet, FYI.
public function getThemeBlockClasses()
{
return array(
'image' => array(
'img-border-padding'
),
'image' => array (
'img-circle'
),
'*' => array(
'padded-yellow-bg'
)
);
}
Thank you.
Thanks for your help.
https://documentation.concrete5.org/developers/designing-for-concret...
But still, it is a good thing to look in the core to see how things are done.
Goodluck.
<?php echo $html->css($view->getStylesheet('main.less')) ?>
The getStylesheet method calls the getStylesheetObject. In here the constant DIRNAME_CSS is used wich has the value css.
However, it is not mandatory. You can provide a CSS file yourself.
https://documentation.concrete5.org/developers/designing-for-concret...
You can parse the less/sass yourself using task helpers like Grunt or Gulp. If you have installed Concrete via composer (see the download page) you can also use Laravel mix to do this.
The getThemeBlockClasses method should be placed in the page_theme.php file which is located in the theme folder.
Use the elemental theme as reference: concrete\themes\elemental\page_theme.php. It is also important that the theme is installed and activated.
Example from the elemental theme