Content Blocks
Hi all
We are currently trying to query Content Blocks by Title, but a better approach for us would be to get each Content Block by it's guid. How can we find the Guid on the content block, is it stored somewhere that we can read, best would be in the Sitefinity backend, or as a workaround in the database.
Thanks in advance
Henrik
Henrik,
As far as I know, there is no way to get the ID of a content block from the administration. However, you can find the ID from the database in the table "sf_content_items". When you browse that table, you will see all of the Content Blocks in the system. The column that holds the ID you'd like is "content_id".
Thanks!
Chris
Hallo Chris
Many thanks for your answer, we will try the table method :-).
Best regards
Henrik
Hello guys,
Another way to get the item's Id is to use dev tools like Firebug or hitting F12 on Chrome. Inspect the Network tab and find the ContentItemService.svc call, then switch to Preview tab. From there you can expand the Items collection and see the Id for each item that you want. Take a look at this video.
This approach is valid for each type of content items e.g. News, Events, Blogs etc.