By default, you can place as many blocks in an area as you want. However, there are situations where a restriction to a single block might have some advantages.
In an absolute positioned layout, it can happen that the Add
To
Main
link overlaps with another area or you simply want to make sure that there's just a single image block in the header area. Have a look at the following two steps to add this restriction:
Open the theme template where you'd like to add a restriction to the number of blocks.
default.php
does the job again.Look for the PHP part where you specify the area and insert the highlighted line shown here:
<?php $b = new Area('Main'); $b->setBlockLimit(1); $b->display($c); ?>