Button Nav works with concrete5 core versions from v8.0 and above. Button Nav is designed to work with bootstrap based themes, but can be adapted to work with other themes.
The mechanisms that Button Nav uses to associate button design with blocks and block templates was introduced in the concrete5 core version v8.4.0.
For earlier core versions before v8.4.0, Button Nav provides a fallback mechanism that has some minor limitations. With older concrete5 core versions, it is recommended to save the page edit between selecting a Button Nav block template or editing block design and using the Button Design menu, otherwise button designs can sometimes become mislaid.
If in doubt, please contact me through concrete5 marketplace support and I can advise you of compatibility with your theme and core version.
When all caching is enabled, some hignly cached blocks such as Autonav may not load the required assets from their block views. To compensate, when caching is enabled, Button Nav will load the assets from on_start in the package controller.
This processing is normally optimized to only load assets on pages where Button Nav is used. If you use Button Nav in a global area or on nearly every page, this optimization is superfluous and it will be better to load Button Nav assets regardless. To do so in /application/config/ set jl_button_nav.asset.optimize_when_cached => false.
Creating your own block templates
Whilst any block can be used in a stack with Button Nav, if you have many uses of a block with Button Nav, it can be more convenient to create a block specific template.
The mechanisms button nav uses can be built as a wrapper within other block templates. Button Nav associates with block templates through the template name, so Button Nav will add itself to a block edit menu for any template file that begins 'button_nav_'. Additional keywords in the template name are used to load further Button Nav dialog elements:
- _ dropdown - dropdown options are added to the Button Design menu where the template name includes the keyword '_dropdown'.
- _ width - dropdown width options are added to the Button Design menu where the template name includes the keyword '_width'. This is typically for Content and Stack display dropdowns.
- _lightbox - lightbox options are added to the Button Design menu where the template name includes the keyword '_lightbox'.
The simplest example is to compare templates for the core Content block and see how the default template has been extended by the respective Button Nav templates. A similar design pattern can be used to create templates for any block.
For advanced use, Button Nav has configuration values:
- jl_button_nav.asset.optimize_when_cached => true
Set this false to load assets on all pages when the cache is enabled.
- jl_button_nav.dialog.previous_selection_limit => 24
This controls the number of previous designs to show in the Button Design edit dialog.