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...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
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...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.