June 22, 2012

Sublayout Queryable Datasource module on trac

I have release a new module on trac. This one allow you to select the datasource dynamically with a XPath query in the dialog open when you insert a sublayout in webedit mode.
If you don't like the video version here is a small description of this module.


If you have a multisite solution and if you want to use the field "Datasource Location" and "Datasource template" on you sublayout to open the datasource selection dialog when you add this sublayout on your page in page edit mode, you are not able to select the folder dynamically. by default sitecore only allow to select a folder like /sitecore/content/MyDatas. The idea of this module is to enable the possibility to select this folder relatively to the current item with an XPath query as you do in the fields for example. After installing this module you will be able to select this folder with a query syntaxt like this one for example:
query:ancestor-or-self::*[@@templatename = 'Website Root']/Data/Demo

How to Install?

  • You can download package from here.
  • Install it with the sitecore installation tool in the desktop of sitecore

Next steps

If you have any issues or suggestions for the Sublayout Queryable Datasource module, please report it by posting a comment on this post.


  1. Fantastic module. Should be something built-in on Sitecore :)

  2. This comment has been removed by a blog administrator.

  3. Very helpful, but this seems to work only when we add a new sublayout. If we try to edit existing sublayouts on the page using page editor, it opens up the entire content tree. Any solutions?