setBlockLimit() not working in Edit mode

Permalink
Hi everyone,

This USED to work for me in previous versions of C5 but since I started using 5.4.0.5 the setBlockLimit() is being ignored.

If you wouldn't mind - has anything changed? My code is as follows:

<?php
       $menu = new Area('Menu');
        $menu->display($c);
   $menu->setBlockLimit(1);
        ?>


When in edit mode, I still have the ability to add another block in that area. It's causing problems for me because I have other editable regions underneath the menu nav which I cannot click in to add a block because these 2 editable areas are now overlapping.

Frustrated,

Suzy

suzykaploozie
 
LucasAnderson replied on at Permalink Best Answer Reply
LucasAnderson
I believe you need to set the block limit before you display the area, so:

<?php
$menu = new Area('Menu');
$menu->setBlockLimit(1);
$menu->display($c);
?>
suzykaploozie replied on at Permalink Reply
suzykaploozie
I can't believe it was that simple! Thank you so much, that did it. I always reference Remo's site when coding my html for C5
http://www.codeblog.ch/2009/01/concrete5-theme-erstellen/...

..he had it at the bottom =\

Thank you SOOOO much!

Suzy