Block position in the area
PermalinkBelow code shows that "%4$s" print block numbers. Like row1,row2,row3
$a = new Area('Main');
$a->setBlockWrapperStart('<div class="row%4$s">', true);
$a->setBlockWrapperEnd('</div>');
$a->display($c);
This function is not working in 5.7, so how can print block numbers in blockwrapper?
Thanks Rajesh.
What I'm trying to do is display the Block Position Number in the block. I've tried modifying your code using the code below:
<script type="text/javascript"> $(window).load(function() { $("#mag_pg").each(function(i) { $('.pg_num').append('<p>Page ' + (i + 1) + '</p>'); }); }); </script>
It displays the text but each block displays the Block Position Number for all blocks. For instance, if I have 3 blocks, every block in that area would have <p>Page 1</p><p>Page 2</p><p>Page 3</p> at the bottom.
You can use javascript for that....