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
BrendanLawton
View Replies:
ramonleenders replied on at Permalink Reply
ramonleenders
Hi there,

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.
BrendanLawton replied on at Permalink Reply
BrendanLawton
I knew that! Silly me... thank you!
ramonleenders replied on at Permalink Reply
ramonleenders
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 :)

concrete5 Environment Information

NA

Browser User-Agent String

NA

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.