Tag Archives: Sitecore

Auto-Generating Custom Items on Save

When the Custom Item Generator (CIG) was originally built by Velir’s MVP Gabe Boys several years ago, it revolutionized how we build Sitecore sites and how we reference items. Gabe provided us with an intuitive way to access a Sitecore item’s field values through the custom item wrapper. Continue reading

Predicate Builder

In many of the Sitecore 7 Hangouts and various presentations, they show how to query either Solr or Lucene using a simple POCO (Plain Old CSharp Object) object. This is a great approach to querying. It allows us to use an object orientated approach and has changed the way we go about accessing data from our indexes, similar to what the Custom Item Generator did for us some years back in how we access an item’s fields. The question is, how do you iterate over the parameters in a querystring (#q/activitylevel=Level 2&price=3000&continentnames=Europe,Asia) and match the key to a property on your POCO object? How do you dynamically build an index query to represent the many layers of possible search clauses? This is where the predicate builder becomes valuable. Continue reading