View presentation control code path

Sitecore Architect
  • Twitter
  • LinkedIn

View presentation control code path

How many times did you need to quickly view the code path of say a sublayout control from the presentation settings of an item? This is especially true when multiple developers are working on a Sitecore project or you need to review an existing Sitecore project code. ?

The normal process is to select the control, click on Change so that you are shown its path relative to Sublayouts folder in Sitecore content tree. You then need to go to that sublayout in content tree and then finally check the value of field Ascx file to find the exact location of the code-behind file in the solution.

How easy it would be to select a sublayout control and find the location of the code-behind in the Sitecore visual studio solution on click of a button. Well this is exactly what this module would do.

Once you install this package ( ViewDetails.zip attached below) these two new files would be added:

1- "\Website\sitecore\shell\SublayoutPath.aspx"

2- "\Website\bin\Custom.SitecoreExtensions.dll"

3- You would then have to manually change the file in "\Website\sitecore\shell\Applications\Layouts\DeviceEditor\DeviceEditor.xml". If you are having the same Sitecore version that I have i.e. "8.1 rev. 151207", you can very well replace this file with this custom DeviceEditor.xml attached below. Following are the changes needed in this file:

(a)- Comment out this line


(b)- Insert this line as a replacement

(c)- At ,

, insert this following line between
ViewDetailsPackage

Device Editor XML

Related Blogs

Latest Blogs