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

Page History: Template Usage - Sitecore

Compare Page Revisions



« Older Revision - Back to Page History - Newer Revision »


Page Revision: Tue, May 15, 2012, 3:04 PM


Overview

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

Solution

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

declare
     @myTemplateID uniqueidentifier = 'CCB6DC31-DB14-47E3-902D-55B2C0767A71'
    
select 
    t.*
    
from 
    dbo.Fields f
    
    inner join dbo.ItemTree t
        on f.ItemId = t.ID
        
where 1=1
    and FieldId = '12C33F3F-86C5-43A5-AEB4-5598CEC45116'
    and Value like '%' + CONVERT(varchar(100), @myTemplateID) + '%'

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