heimrichhannot / contao-tab-control-bundle
Adds tabs content elements to contao.
Installs: 709
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 7
Forks: 1
Open Issues: 0
Type:contao-bundle
Requires
- php: ^7.1
- contao/core-bundle: ^4.4
- heimrichhannot/contao-utils-bundle: ^2.90
Suggests
- heimrichhannot/contao-encore-bundle: Advanced integration of symfony webpack encore in contao.
Conflicts
README
This Bundle brings Bootstrap 4 Tabs to Contao.
Features
- add 3 new Content Element: Start, Seperator, Stop
- option to store last open tab in session (sessionStorage)
- migration command for migration from contao-legacy/fry_accessible_tabs or heimrichhannot/contao-bootstrapper tabs
- Encore Bundle support
Install
A note before install: this bundle does not come with bootstrap styles.
-
Install with composer:
composer require heimrichhannot/contao-tab-control-bundle
-
Update Database
-
If you use Encore Bundle, run symfony command
encore:prepare
andyarn encore [dev|prod]
(you don't need to active the entry manual if you use encore bundle version >= 1.3) -
If you don't use Encore bundle and have bootstrap already included, you may want to unset
$GLOBALS['TL_JAVASCRIPT']['huh_contao-tab-control-bundle_bootstrap-tabs']
to don't have bootstraptab.js
andutil.js
included twice.
Usage
This bundle brings three new content elements. To setup a tab section, choose the tab start element. For each new tab add an tab seperator element within the tab start and tab end element. The tab names are set in the tab start and the tab seperator elements.
Command
huh:tabcontrol:migrate
: Provide migration from contao-legacy/fry_accessible_tabs, heimrichhannot/contao-bootstrapper tabs and older bundle versions. See huh:tabcontrol:migrate --help
for options.
Use with other frontend frameworks
To use this bundle with other frameworks than bootstrap 4, you need to unset the frontend assets (with encore bundle just add and disable entry in your root page, without encore bundle use for example generatePage hook to unset $GLOBALS['TL_JAVASCRIPT']['huh_contao-tab-control-bundle_bootstrap-tabs']
). Afterward you can override the ce_tabcontrol templates to correspond to your frontend framework syntax.