Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Does anyone know if it's possible to load the model for a block (either the PublishedElementModel or the underlying IPublishedElement) by it's Guid?
Something like PublishedContentQuery.content(Guid) / ContentService.GetById(Guid) - but for blocks?
Hi Neil
You need to get the node that has the block first, and then you can filter the block list/grid property to find the desired block.
Yeah, that's what I've ended up doing. I was just hoping there was some build in indexing that I couldn't find documented, to avoid using reflection.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Getting blocks by guid
Does anyone know if it's possible to load the model for a block (either the PublishedElementModel or the underlying IPublishedElement) by it's Guid?
Something like PublishedContentQuery.content(Guid) / ContentService.GetById(Guid) - but for blocks?
Hi Neil
You need to get the node that has the block first, and then you can filter the block list/grid property to find the desired block.
Yeah, that's what I've ended up doing. I was just hoping there was some build in indexing that I couldn't find documented, to avoid using reflection.
is working on a reply...