Tuesday, July 26, 2011

query syntax in sitecore rocks' query analyzer

Just recently I started using sitecore as a CMS with a large website, the typical developer interface has been the web interface and I found this quite constrictive and limiting.  A quick google pointed me to SiteCore Rocks, which has alot of promise, despite some of the rough edges.

While not being an authority on either Sitecore or Rocks, i find the tool very useful for navigation and searching at the moment.   One problem I did encounter was a lack of documentation.  That said, Jakob Christensen addressed the query analyzer syntax documentation on a question I asked over here.

In short, use the HELP keyword, for instance type help select and you'll get some detailed help.

You can also use scripting commands from the sitecore explorer 

select @title, @text from /sitecore/content//*[@@templatekey = 'sample item']

select * from //*[@@id='{0DE95AE4-41AB-4D01-9EB0-67441B7C2450}'];

you will need to use identifier escaping since field names can have spaces so enclose them with # on each end as in select @#Long Text# from /sitecore/content/Home

No comments:

Post a Comment