Hi all,
I've been experimenting with an idea to make a footer block that works with the Bootstrap responsive columns to display according to the number of blocks. You may remember from a previous posting that I achieved this in respect of being ok for around six blocks or so. This is because the available space reduces on the row due to a smaller 'span' class number. A recent posting about block widths being consistent reminded me of the requirement to have sufficient suitable space.
So, I have adapted the code such that up to four blocks per 'row' are shown. Any remaining blocks less than the number of blocks per row are adapted to fill the available space given the number of remaining blocks to display. The number of blocks per row is parameterised and can be changed in the file 'layout/footerblocks.php' being the last parameter:
$OUTPUT->shoelaceblocks('footer', 'row-fluid', 'aside', 2);
If you enter more than '4' then this will be truncated. If you enter '0' then it will not be treated correctly to use the new code - need to fix that. Editing works as does drag and drop of a fashion, I can't break it but sometimes it's not pretty until page refresh. Instead of using drag and drop you can edit a block and say where you want it to be on that page.
You can get the updated code to try on a DEVELOPMENT server from: https://github.com/gjb2048/moodle-theme_shoelace/tree/MOODLE_25_FOOTER_BLOCK
The effect is shown by the attached screen shot.
Thoughts / comments?
Cheers,
Gareth