Block Variables

Permalink 1 user found helpful
Hi there,

Does anyone know how i would get the name of the Block being called. I've got the Pagelist block in a page and i've created a custom template for it, i want to use the name of the block in the view of the block.

hope that makes sense.

 
Sadu replied on at Permalink Best Answer Reply
Sadu
Sounds like you mean the Block name that you enter on the custom templates screen.

Try adding this to your custom template view...
$block = block::getById($bID);
echo $block->getBlockName();
andoro replied on at Permalink Reply
andoro
Great, it works for me ;)