Jasinski Technical Wiki

Navigation

Home Page
Index
All Pages

Quick Search
»
Advanced Search »

Contributor Links

Create a new Page
Administration
File Management
Login/Logout
Your Profile

Other Wiki Sections

Software

PoweredBy

Sublayout Usage - Sitecore

RSS
Modified on Tue, May 15, 2012, 2:55 PM by Administrator Categorized as Sitecore

Overview

This article describes a way to query your Sitecore database to determine where a sublayout is used.

Solution

This solution requires the dbo.ItemTree view, available here.

declare 
    @mySublayoutID uniqueidentifier = '4F63F6B1-2010-4F28-B71D-EBAEDE013592' 
    
select 
    t.*
    
from 
    dbo.Fields f
    
    inner join dbo.ItemTree t
        on f.ItemId = t.ID
        
where 1=1
    and FieldId = 'F1A1FE9E-A60C-4DDB-A3A0-BB5B29FE732E'
    and Value like '%<r id="{' + CONVERT(varchar(100), @mySublayoutID) + '}"%'

ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2024, Patrick Jasinski.