Add Bedrock Support to Page Theme Class

Now let's let our theme know we support Bedrock by registering it within page_theme.php.

To mark your theme as Bedrock compatible, use the Concrete\Core\Page\Theme\BedrockThemeTrait class within it. Add

use Concrete\Core\Page\Theme\BedrockThemeTrait;

to the top of the page_theme.php file, and use the trait within the class itself:

<?php
namespace Application\Theme\Flintstone;

use Concrete\Core\Page\Theme\BedrockThemeTrait;
use Concrete\Core\Page\Theme\Theme;

class PageTheme extends Theme
{

    use BedrockThemeTrait;

    public function getThemeName()
    {
        return t('Flintstone');
    }

    public function getThemeDescription()
    {
        return t('A colorful Concrete CMS theme.');
    }

}

This does a few things:

  1. Marks the theme as supporting the typography and basics features.
  2. Tells Concrete CMS that we need to load a number of external assets when rendering the theme, including jQuery, Bootstrap, Vue and more.
  3. Registers the bootstrap5 grid framework as supported (since Bedrock is built on Bootstrap 5).
  4. Registers the standard bootstrap colors as the supported color collection.

Next, let's make our theme editable and add some basic content.