User tests: Successful: Unsuccessful:
Even if Joomla core still uses Bootstrap 2 there are more and more Bootstrap 3 templates for Joomla.
It's easy to "translate" grid classes span1 to span12 with LESS to work with Bootstrap 3 (where they don't exist anymore) but needs knowledge and is too much for "normal" users.
So, the idea of this PR is to establish a new Advanced option bootstrap_class in module settings that makes it possible to select span for BS2 or several other classes used with BS3.
Go to frontend. (Looks a bit weird. Just because position banner is not inside a .row-fluid.)
See HTML source code of module (has a BS2 class span6):
<div class="moduletable span6">
<h3>Bootstrap class</h3>
<div class="custom" >
</div>
</div>
<div class="moduletable col-sm-6">
<h3>Bootstrap class</h3>
<div class="custom" >
</div>
</div>
Status | New | ⇒ | Pending |
Labels |
Added:
?
?
|
But what's about the bootstrap size that already exists in module settings and the span that is set statically by core modChromes xhtml and html5 already. They are useless for all non-BS2 templates.
But what's about the bootstrap size that already exists in module settings and the span that is set statically by core modChromes xhtml and html5 already. They are useless for all non-BS2 templates.
That was a decision made long before my time. But I sure don't want to add parameters for any possible template framework into core. That's certainly a wrong approach.
The existing bootstrap size mainly is wrong named. Users don't understand the purpose anyway. It should be better named "width" or so. You can still use this in your own template chromes. Obviously the system chromes will not work, but the template ones will work just fine with that parameter. You just would have a hardcoded (or coming from a template parameter) prefix.
As said, best would be if the template would add additional parameters to the module edit form. I guess that should actually be possible using a system plugin, but I haven't tried that. It would be the best and most flexible approach.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-09-16 02:34:16 |
Closed_By | ⇒ | bertmert |
I don't think adding template specific parameters to modules is a good approach. Especially since that parameter is useless for all non-BS3 templates (and chromes which don't support it). It will confuse users more than it helps.
A better approach would be to allow the templates to define additional module chrome parameters which are then shown in an own tab in the module form. However that could be a UX nightmare because the options would depend on the template/chrome in use.