Tuesday, August 14, 2012

Sitecore Tip O' The Evening

Using this in SC 6.5, pretty sure it works with all the current versions...

If you have a lookup field type and need to filter at the child level of the current parent by template name, use this: query:./parent::*[@@templatename='Activity']. Works like a charm. Basically this will allow you to have a mix of TemplateA and TemplateB under the same parent (more for content tree and SEO purposes than anything else) and be able to only allow the content editors to select from like templates in your lookup field.