Archive for July, 2008

Sitecore 6 – Device editor feature

Thursday, July 10th, 2008

Hey guys,

while I’m working with Sitecore 6, I missed the feature to sort my layouts in subfolders, so called “node item(s)” in the new version (the treepicker on the right hand side).

So if you want to list subfolders as well, go to this “\WebSite\sitecore\shell\Applications\Layouts\DeviceEditor\DeviceEditor.xml” file and replace this line:

<datacontext DataViewName=”Master” Root=”{75CC5CE4-8979-4008-9D3C-806477D57619}” Filter=”Contains(‘{A87A00B1-E6DB-45AB-8B54-636FEC3B5523},{1163DA83-B2EF-4381-BF09-B2FF714B1B3F},{3A45A723-64EE-4919-9D41-02FD40FD1466},’, @@templateid)” id=”LayoutDataContext”></datacontext>

with this one:

<datacontext DataViewName=”Master” Root=”{75CC5CE4-8979-4008-9D3C-806477D57619}” Filter=”Contains(‘{A87A00B1-E6DB-45AB-8B54-636FEC3B5523},{1163DA83-B2EF-4381-BF09-B2FF714B1B3F},{3A45A723-64EE-4919-9D41-02FD40FD1466},{239F9CF4-E5A0-44E0-B342-0F32CD4C6D8B}’, @@templateid)” id=”LayoutDataContext”></datacontext>

This adds the template id of the node item template to the filter of displayed items in the tree picker.

Good night, cheers chris

Read Alex’s comment to learn how to do it in a nice way, use the override folder instead of changing the original xml layout and use the folder template id instead of the node template.