Accessing Page's Attributes from a Custom Block

Permalink
Apologies if this is answered elsewhere, but you'll get karma points if you point me in the right direction anyway!

I've added the following to a custom block:
<?php echo  $cobj->getCollectionAttributeValue('myattributename');?>


which returns a fatal error:
Call to a member function getCollectionAttributeValue() on a non-object in /var/www/virtual/dev/blocks/minutes_header/view.php on line 1

I've also tried with the $c object. Not sure how to instantiate a page object correctly. Any assistance appreciated.

McPadawan
 
Shotster replied on at Permalink Best Answer Reply
Shotster
Have you tried...

$c = Page::getCurrentPage();


-Steve
McPadawan replied on at Permalink Reply
McPadawan
Thanks, that did the trick!