The JungiThemeBundle is a powerful theme engine designed for the Symfony2. It provides flexible and smart themes which have so-called tags. Simply these tags allows you for eg. select an appropriate theme (mobile or desktop version) for a current request (I will cover about it later). You can do with tags whatever you want, there is no limit. Of course the abilities of this bundle not end here. Read the docs if you want to know more.
The most useful features:
- Themes with tags support
- The possibility of change the current theme
- Smart theme selecting based on a request
- Flexible themes manage
- Theme mappings (xml, php, yaml)
- Themes validation
All documentations will be listed in the Resources/doc
directory
Add JungiThemeBundle in your composer.json:
{
"require": {
"jungi/theme-bundle": "~1.0"
}
}
Or run the following command in your project:
$ php composer.phar require jungi/theme-bundle "~1.0"
Enable the bundle in the kernel:
<?php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new Jungi\ThemeBundle\JungiThemeBundle(),
);
}
The bundle comes with a default set of configuration which is listed bellow:
# app/config/config.yml
jungi_theme:
ignore_null_themes: true
This step is optional
You should switch the option ignore_null_themes to false.
# app/config/config.yml
jungi_theme:
ignore_null_themes: false
The purpose of the option ignore_null_themes is merely to ensure that a project will not blow up (:, but seriously it intends to not show an exception if a ThemeResolverInterface instance will return null which means that it can not match any theme for the current request.
This bundle is under the MIT license