page vObj protected
Permalink Browser Info Environment
Hi, when I try and get the thumbnail of a page after having created a block which has a page selector, the vobj property of the page is protected and I can't access the page's thumbnail by running:
$page = Page::getByID($page_item["page"]);
Type: | Discussion |
---|---|
Status: | Resolved |
I knew that! Silly me... thank you!
No problem, glad to help whenever I can.
If possible, leave a short review for the Add-On over here:
https://www.concrete5.org/marketplace/addons/block-designer/reviews...
Will help me and others very much :)
If possible, leave a short review for the Add-On over here:
https://www.concrete5.org/marketplace/addons/block-designer/reviews...
Will help me and others very much :)
Did you try this?:
$thumbnail = $page->getAttribute('the_thumbnail_handle');
The vobj is always protected and you shouldn't do $page->vObj, period. You should always use the available functions of the page class instead.