Wednesday, January 30, 2008

Dev Layout Chunk


When developing new web sites or demos with Sitecore, especially during the phase of building the presentation layer, I often have to switch to the Standard Fields and Raw Values to copy and paste layout definition from one item to another or from a template's standard values to another item. Also, sometimes I have to reset the layout field value to restore the inheritance from the standard values. This kind of operation takes at least 5 clicks, that's why I have created a "Dev Layout" chunk allowing you to do the following operations with one click:

  • Copy the presentation logic of the current item to the clipboard
  • Paste the presentation logic from the clipboard to the current item
  • Reset the layout field (set the value of the "Renderings" field to null which opens up field inheritance from standard values)
    • available for all the children of the selected item
  • Empty the layout field (set the value of the "Renderings" field to empty string which blocks the field inheritance from standard values BUT allows inheritance from the template itself)
    • available for all the children of the selected item

This is how it looks:

dev_layout

Here are the links:

Disclaimer:

This solution is provided AS IS, with no guarantee, and stuff. Sitecore is not responsible for supporting this extension which is considered as a product customization which means that this solution may not be working on next major releases while was developed on 5.3.1 build 071114.

Please do not deploy on the production servers as it was intended for developer use on designated dev boxes. Please use responsibly ;-)

3 comments:

Anonymous said...

Great idea, nicely done. Maybe post this into snippets forum on sdn5?

I think you need to explain difference between "empty" & "reset" in more detail though.

Unknown said...

useful indeed, cool stuff.

P.

Unknown said...

Thanks for the feedback, guys.
There was a typo in the description of the 'reset' functionality. Fixed now. Should make more sense.