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

Media Item ID versus File Path - Sitecore

RSS
Modified on Thu, Sep 27, 2012, 9:51 AM by Administrator Categorized as Sitecore
Note that the MediaRelativeFilePath column is relative to the website root.

select 
     MediaItemID           = f.ItemId
    ,MediaRelativeFilePath = f.Value
    ,MediaItemPath         = t.ItemPath
from 
    dbo.ItemTree t
    
    inner join dbo.Fields f
        on t.ID = f.ItemId
        and f.FieldId = '2134867A-AC67-4DAC-836C-A9264FD9D6D6'
        
where 1=1
    and t.ItemPath like '/sitecore/media library/%'
    and t.TemplateID <> 'FE5DD826-48C6-436D-B87A-7C4210C7413B' -- exclude folder

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