Page 1 of 1
Modular Index - Again
Posted: Thu Apr 01, 2021 9:04 am
by LeeFoster
Ok I'm looking at the modular index again and have a few questions, I suspect only @ecartz or @burt can answer.
1. Is it possible to add extra sections past I?
2. Is it possible to give each section a background colour?
Re: Modular Index - Again
Posted: Thu Apr 01, 2021 9:22 am
by LeeFoster
LeeFoster wrote: ↑Thu Apr 01, 2021 9:04 am
1. Is it possible to add extra sections past I?
I have answered this one myself.
Re: Modular Index - Again
Posted: Thu Apr 01, 2021 9:24 am
by heatherbell
LeeFoster wrote: ↑Thu Apr 01, 2021 9:22 am
LeeFoster wrote: ↑Thu Apr 01, 2021 9:04 am
1. Is it possible to add extra sections past I?
I have answered this one myself.
Maybe post the answer for future readers?
Re: Modular Index - Again
Posted: Thu Apr 01, 2021 9:31 am
by LeeFoster
heatherbell wrote: ↑Thu Apr 01, 2021 9:24 am
Maybe post the answer for future readers?
It was done by adding/duplicating the parameters in cm_i_modular.php
They need to be added to
protected function get_parameters() {
and
public static function display_layout() {
I'm not yet sure how this is going to affect anything so I do not recommend doing it unless you are 100% confident in your abilities.
Re: Modular Index - Again
Posted: Thu Apr 01, 2021 10:03 am
by burt
Add in a .css target to each block in the main template file (or a copy of if running a template):
echo '<div class="col-sm-' . $v . '">';
to
echo '<div class="col-sm-' . $v . ' block-' . $k . '">';
And then in .css:
.block-a { background: red; }