Custom Attribute and Fatal Error

Permalink
I created a custom attribute called byline for my blog to display the author's name. In blog_entry.php it looks like this

By <?php echo $c->getCollectionAttributeValue('byline') ?>


And you can see the result here:
http://www.angelride.org/blog/pain-threshold/...

However, when I try and update the main blog page - which uses a page list - and I insert the same code, I get an error message:

By
Fatal error: Call to a member function getCollectionAttributeValue() on a non-object in /home5/keithkno/public_html/angel/blocks/page_list/templates/angelride.php on line 65

Any thoughts?

kreative
 
hutman replied on at Permalink Best Answer Reply
hutman
In the PagetList block the page variable is $page not $c, so if you swap that out it should work.
kreative replied on at Permalink Reply
kreative
Thanks that did the trick.