Skip to content
This repository has been archived by the owner on Dec 2, 2022. It is now read-only.

Commit

Permalink
Fix: Update frontpage home block area information.
Browse files Browse the repository at this point in the history
  • Loading branch information
gjb2048 committed Jun 5, 2018
1 parent 5c714de commit 00bc4ff
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGES.txt
@@ -1,6 +1,7 @@
New in 3.5.0.2
==============
- FIX: Block editing menu item hover.
- FIX: Update frontpage home block area information.

New in 3.5.0.1
==============
Expand Down
16 changes: 8 additions & 8 deletions classes/output/core_renderer.php
Expand Up @@ -2060,16 +2060,16 @@ protected function essential_blocks_for_region($region, $blocksperrow, $editing,

/* When editing we want all the blocks to be the same as side-pre / side-post so set by CSS:
*
* aside.footer-edit .block {
* .footer-fluid-span(3);
* aside.rowblock-edit .block {
* .rowblock-fluid-span(6, @fluidGridColumnWidth, @fluidGridGutterWidth);
* }
*/
if (($blocksperrow > 4) || ($editing)) {
$blocksperrow = 4; // Will result in a 'span3' when more than one row.
}
$rows = $blockcount / $blocksperrow; // Maximum blocks per row.

if (!$editing) {
if ($blocksperrow > 4) {
$blocksperrow = 4; // Will result in a 'span3' when more than one row.
}
$rows = $blockcount / $blocksperrow; // Maximum blocks per row.

if ($rows <= 1) {
$span = 12 / $blockcount;
if ($span < 1) {
Expand All @@ -2086,7 +2086,7 @@ protected function essential_blocks_for_region($region, $blocksperrow, $editing,
$currentrequiredrow = 1;
foreach ($blockcontents as $bc) {

if (!$editing) { // Using CSS and special 'span3' only when editing.
if (!$editing) { // Using CSS and special 'span3' only when not editing.
$currentblockcount++;
if ($currentblockcount > ($currentrequiredrow * $blocksperrow)) {
// Tripping point.
Expand Down
2 changes: 1 addition & 1 deletion lang/en/theme_essential.php
Expand Up @@ -490,7 +490,7 @@
$string['frontpagemiddleblocks'] = 'Enable additional front page \'Home\' (was \'Middle\') blocks';
$string['frontpagemiddleblocksdesc'] = 'If enabled this will display an additional block location just under the marketing spots.';
$string['frontpagehomeblocksperrow'] = 'Home (was \'Middle\') blocks per row';
$string['frontpagehomeblocksperrowdesc'] = 'State up to how many blocks per row between {$a->lower} and {$a->upper} for the \'Home blocks\' block region.';
$string['frontpagehomeblocksperrowdesc'] = 'State up to how many blocks per row between {$a->lower} and {$a->upper} for the \'Home blocks\' block region. Note: For ease when editing, two blocks per row will be shown regardless of this setting.';
$string['fppagetopblocks'] = 'Enable additional front page \'Page top\' blocks';
$string['fppagetopblocksdesc'] = 'If enabled this will display an additional block location beside the side blocks and above the content area. Note: The number of blocks per row depends on the setting \'fppagetopblocksperrow\'.';
$string['fppagetopblocksperrow'] = 'Page top blocks per row';
Expand Down

0 comments on commit 00bc4ff

Please sign in to comment.