Skip to content

Instantly share code, notes, and snippets.

@arvi
Last active April 16, 2016 06:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arvi/a16ce4dd330545d14f9f408d96da6d34 to your computer and use it in GitHub Desktop.
Save arvi/a16ce4dd330545d14f9f408d96da6d34 to your computer and use it in GitHub Desktop.
<?php
namespace Application\Theme\MyThemeName;
use Concrete\Core\Page\Theme\Theme;
class PageTheme extends Theme {
//just telling the theme that it supports a particular grid framework, in this case Bootstrap 3
protected $pThemeGridFrameworkHandle = 'bootstrap3';
//automatically gets run anytime the theme gets rendered
public function registerAssets() {
//provideAsset - these assets are provided by the theme so don't worry about loading them
//e.g any javascript asset defined in config/app.php that starts with bootstrap will not be loaded... instead we use our theme's bootstrap
$this->providesAsset('javascript', 'bootstrap/*');
$this->providesAsset('css', 'bootstrap/*');
$this->providesAsset('css', 'blocks/form');
$this->providesAsset('css', 'core/frontend/*');
//requireAsset - let's us remove the version of a specific file, in this case, jquery in our theme and instead us concrete5's jquery
$this->requireAsset('javascript', 'jquery');
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment