using getTotalBlocksInArea
PermalinkWhat I'm trying to this is this:
Problem is however, that getTotalBlocksInArea only works after you've called display. But this is exactly what I'm trying to avoid. I don't want to display anything, especially not the div if there's no block in the area..
(I would have to check whether the page is in the edit mode or not as well, it's just a simplified example)
Thanks!

greets Marv
I didn't check tho...
Same issue, so no it isn't fixed in 5.3.1.1
Would really appreciate it if it would work somehow.
(and no I didn't found a workable workaround, manually coding each time for a new page isn't really what I had in mind.)
... if ($pic->getTotalBlocksInArea($c) > 0) { ...
greets, Marv
I also tried $a->totalBlocks, but that returned nothing usable. Now it works for me too.
Will get that in there for the next release - but in the meantime yeah, just pass the page object into this method and it should be accurate.
So this method is probably going to stay the same as it has been. We'll just make a note that, when theme and template builders are using this method, they really need to pass the page object through.
http://www.concrete5.org/community/forums/usage/layout-makes-blocks...