heimrichhannot / contao-frontend-framework-bundle
This bundle allows to select a frontend framework in your theme.
Installs: 374
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 6
Forks: 0
Open Issues: 0
Type:contao-bundle
Requires
- php: ^8.0
- contao/core-bundle: ^4.13 || ^5.0
- heimrichhannot/contao-utils-bundle: ^2.232 || ^3.0.0-beta
README
This bundle allows to select a frontend framework in your theme. This option can be used by bundle and templates to adjust for these specific frameworks.
Installation
-
Install the bundle with composer or contao manager and update the database afterwards.
composer require heimrichhannot/contao-frontend-framework-bundle
Usage
Just select the frontend framework in your theme settings. Maybe other bundles will add additional settings for the selected framework. Out of the box this extension has no build in functionality except the framework selection.
Use in your bundle
Use the FrontendFrameworkHelper
to get the selected framework.
use HeimrichHannot\FrontendFrameworkBundle\Helper\FrontendFrameworkHelper; class CustomController { private FrontendFrameworkHelper $frontendFrameworkHelper; public function myCustomAction() { if ('bootstrap4' === $this->frontendFrameworkHelper->currentFramework()) { $theme = $this->frontendFrameworkHelper->currentTheme(); if (true === $theme->custonControlsBs4) { // do something } } } }