backdrop-contrib / views_bootstrap

This module provides a set of styles for the Views module. It allows you to create responsive Bootstrap 3.x components, such as grids, carousels, tabs, and tables, all within the configuration settings of the powerful Views module.
https://backdropcms.org/project/views_bootstrap
GNU General Public License v2.0
0 stars 7 forks source link

Proof of concept for conditionally loading bootstrap assets when plugins used #29

Closed daggerhart closed 5 years ago

daggerhart commented 5 years ago

The purpose of this PR is one approach to #28. It removes the path-based configuration and replaces it with a single checkbox:

screen shot 2018-12-24 at 8 40 38 am

During each template_preporcess_*_plugin_style() function, it looks at the value of that checkbox, and includes bootstrap's CSS & JS if the setting is enabled.

TODO: If you like this approach, we may want to add an update hook that enables this setting all sites that had the old path-based approach enabled.

Radcliffe commented 5 years ago

Thanks Jonathan!