Referring to Blocks That are not Objects
Permalink
I have a Page List, that calls in some hardcoded Blocks, the blocks in question load in the id with the Block id.
eg #randomDiv43
The problem I have is the blocks are being called from the page list and as such are not initiated as objects.
I have tried using
$bv = new BlockView();
$bObj = $bv->setBlockObject($this->getBlockObject());
but $this->getBlockObject() is not an object.
Is there a way to use a unique value instead of the bID that I could pass through on initialisation?? That will not conflict with the legitimate block already on the page.
eg #randomDiv43
The problem I have is the blocks are being called from the page list and as such are not initiated as objects.
I have tried using
$bv = new BlockView();
$bObj = $bv->setBlockObject($this->getBlockObject());
but $this->getBlockObject() is not an object.
Is there a way to use a unique value instead of the bID that I could pass through on initialisation?? That will not conflict with the legitimate block already on the page.
I used
$blockType->controller->bID = $bID;
then on my template page, ameneded the $bID
$bID = $controller->bID."_".$c->getCollectionID();
Not to sure if its possible to create an object for the individual blocks being that they are not being initiated in the correct way. But this seems to work and gives me a relative unique id.