Block Background Image not displaying on custom theme

Permalink 1 user found helpful
I am trying to add several blocks to a page that have a background image. Since I want my client to have access to easily change the background image, I would like to do this using C5's editing tools. However, it does not appear to be working properly.

I click on the block, and select "Design & Custom Template". From there, I click on the little image icon in the toolbar and select an image. I click "Save", and the background image appears properly. Once I publish the page, however, the background image disappears.

I can see these classes wrapping the block before and after I publish: ccm-custom-style-container ccm-custom-style-main-28

Prior to publishing, I can see this CSS is being applied.
.ccm-custom-style-container.ccm-custom-style-main-28 {
background-image: url(/application/files/6614/6584/8477/HERO-SectionHeaderImg-Sponsor.jpg);
background-repeat: no-repeat;
background-size: cover;
background-position: center center;
}

Once I publish, however, I can see no reference to these styles.

The interesting thing is, it works on the default C5 theme.

Any idea on how to fix this?

ScottSandbakken
 
ScottSandbakken replied on at Permalink Reply
ScottSandbakken
As it may be relevant, here is my theme's page_theme.php file

<?php
namespace Application\Theme\NewTheme;
defined('C5_EXECUTE') or die('Access Denied.');
use Concrete\Core\Page\Theme\Theme;
class PageTheme extends Theme {
  protected $pThemeGridFrameworkHandle = 'bootstrap3';
   public function registerAssets() {
      // Jquery
      $this->requireAsset('javascript', 'jquery');
      // Bootstrap
    $this->providesAsset('css', 'bootstrap/*');
      $this->requireAsset('javascript', 'bootstrap/*'); /* Need the core version for editing block temlpates */
      // Core Extensions
    $this->providesAsset('css', 'font-awesome');
    $this->requireAsset('javascript', 'picturefill');
ScottSandbakken replied on at Permalink Best Answer Reply
ScottSandbakken
Figured it out. I did not have a div with the page wrapper class function wrapping the page.

<div class="<?php echo $c->getPageWrapperClass()?>"> 
<!-- page content -->
</div>