+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Content Blocks

Content Blocks

4 posts, 0 answered
  1. Henriette
    Henriette avatar
    41 posts
    Registered:
    20 Aug 2009
    24 Apr 2013
    Link to this post
    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
  2. Chris
    Chris avatar
    11 posts
    Registered:
    10 Mar 2011
    25 Apr 2013 in reply to Henriette
    Link to this post
    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
  3. Henriette
    Henriette avatar
    41 posts
    Registered:
    20 Aug 2009
    26 Apr 2013 in reply to Chris
    Link to this post
    Hallo Chris
    Many thanks for your answer, we will try the table method :-).

    Best regards
    Henrik
  4. Pavel Benov
    Pavel Benov avatar
    341 posts
    Registered:
    14 Mar 2016
    29 Apr 2013
    Link to this post
    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.

    Regards,
    Pavel Benov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
4 posts, 0 answered