One of my colleagues at True Clarity has come up with a really neat solution to one of the challenges introduced by the Sitecore Rendering Engine. If you want to have the same container sublayout multiple times, its difficult to achieve since the placeholder’s xpath will be the same for each row. The solution was to setup dynamic placeholder keys which allow for similar containers to be repeated in a page’s layouts.
The setup this then allows for is:
Placeholder main
– Container in main with placeholders left and right
— Widget in container left / Widget in container right
– Another container in main with placeholder small
— Widgets in container small
– Container in main with placeholders left and right
— Widget in container left / Widget in container right
Without the updated placeholder keys, you would never get the last row of widgets since the xpath for each row would evaluate to the same value (/main/left and /main/right for each row)
You can read all about it at http://trueclarity.wordpress.com/2012/06/19/dynamic-placeholder-keys-in-sitecore/
I am trying to create a popup window that will allow you to select an item from a list of items in a folder. This event should happen when you click on a menu similar to the insert from template, How do I go about doing that?
Good question – its not really related to the dynamic keys but an interesting challenge none the less. The best bet would be to track how the sitecore ui triggers the sort of operations you require – https://blog.boro2g.co.uk/how-do-sitecore-commands-work-in-the-cms/ shows how to achieve this.
Once you know the command to run, dive into core and track down the right click options for eg the content editor. Here you can kick off commands for new custom buttons.