Any help is appreciated
Style sidebar widgets
Thanks for the reply. I do have a sidebar.php but other than adding
I can't figure out how to style anything in it.
Here's an example of basically how I'd like to style each widget plugin
Code: Select all
<?php Theme::plugins('siteSidebar') ?>Here's an example of basically how I'd like to style each widget plugin
Code: Select all
<div class="card">
<div class="card-header">
Recent Posts
</div>
<div class="card-body">
<ul>
<li>First Post Title</li>
<li>Second Post Title</li>
<li>Third Post Title</li>
</ul>
</div>
</div>- Edi
- Site Admin
- Posts: 3109
- Joined: Sun Aug 09, 2015 5:01 pm
- Location: Zurich
- Has thanked: 75 times
- Been thanked: 114 times
- Contact:
The plugin "Static Pages" for example has the class plugin-static-pages.
Therefore you can use to style the titles of the pages:
and
Therefore you can use to style the titles of the pages:
Code: Select all
.plugin-static-pages ul
Code: Select all
.plugin-static-pages li
- Jay
- Master Bludit
- Posts: 144
- Joined: Mon Feb 11, 2019 8:41 pm
- Has thanked: 6 times
- Been thanked: 4 times
Either you stick to already existing element classes, and stylize them targeting those elements using for example :nth-child() selector.
Or you choose a more invasive method, and change the html structure inside every plugin shown in sitesidebar.
Plugins code doesn't change that often so you might try with one or two plugins.
Look for code placed inside public function siteSidebar()
Thanks for the replies, I figured this was the case. It looks pretty good as is so I'll probably just leave them with the basic styling, I just wanted to be sure I wasn't missing something.
Maybe this is a feature that could be considered in a future update. Thanks again for the help
Maybe this is a feature that could be considered in a future update. Thanks again for the help
- Edi
- Site Admin
- Posts: 3109
- Joined: Sun Aug 09, 2015 5:01 pm
- Location: Zurich
- Has thanked: 75 times
- Been thanked: 114 times
- Contact:
What exactly do you mean? That there were more Bootstrap elements?Zeaks wrote: Sun Jul 14, 2019 8:41 pm Maybe this is a feature that could be considered in a future update.
- Jay
- Master Bludit
- Posts: 144
- Joined: Mon Feb 11, 2019 8:41 pm
- Has thanked: 6 times
- Been thanked: 4 times
A simple input field in plugin's options allowing to set a custom class would be more than enough. This reminds me one of the basic configuration options for modules in joomla cms.Edi wrote: Sun Jul 14, 2019 9:34 pm
What exactly do you mean? That there were more Bootstrap elements?
- Edi
- Site Admin
- Posts: 3109
- Joined: Sun Aug 09, 2015 5:01 pm
- Location: Zurich
- Has thanked: 75 times
- Been thanked: 114 times
- Contact:
There is yet a custom class for every plugin.Jay wrote: Mon Jul 15, 2019 2:09 am A simple input field in plugin's options allowing to set a custom class would be more than enough.
- Jay
- Master Bludit
- Posts: 144
- Joined: Mon Feb 11, 2019 8:41 pm
- Has thanked: 6 times
- Been thanked: 4 times
It's hard to disagree.
Unfortunately, it does not make things any easier when it goes to add css frameworks like bootstrap. Easier to add another class to plugin's code, than changing all related classes without breaking whole styling.
That's no problem for me, but bludit aims for a non techie users, thus pointing them to change anything in sourcecode is far away from proper approach in my taste.

