Last active
April 16, 2016 06:59
-
-
Save arvi/a16ce4dd330545d14f9f408d96da6d34 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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