Saturday, 19 July 2014

Configuring Sitecore Item Buckets with different bucket folder path : Part 1

Leave a Comment
An item bucket acts as a repository or container in the content tree where you can store other content items. Also the parent to child relationship between the content items in an item bucket is completely removed and instead the items are automatically organized into folders. Auto organizing content items at the time of creation is based on bucketing strategy. By default, the items are organized according to the date and time of when the item was created, but this can be configured to use different behavior, such as the item’s globally unique identifier (GUID).
As you can see in above image; ACE item is auto-organized by the creation date of the item i.e. Date 14 July 2014, Time 20:00 Hrs. In this blog post; I am going to explain few different bucketing strategies while using Sitecore Item bucket.  Note that I am working on Sitecore 7.2 release. We can change the bucketing strategy by two ways:
  • Using predefined bucketing rules. I’ll be explaining this approach in this blog post.
  • Writing custom code for bucketing strategy. This scenario will be explained in next blog post.
  1. Bucketing Strategy – Using new item creation date: Newly created bucketable items will be auto organized into content tree based on item creation date in yyyy/MM/dd format. I’ve created a new template NEWS and made it as bucketable.  
    Navigate to item bucket settings stored at /sitecore/system/Settings/Buckets location and create a new rule (Bucketing Strategy: Item Creation Date) for resolving the bucket folder path.


    Create a new news item based on News template under bucket folder and it will auto organized by item creation date in yyyy/MM/dd format.
  2. Bucketing Strategy – Using new item name: Newly created bucketable items will be auto organized into content tree based on item name with up to three levels. I’ve created a new template PRODUCT and made it as bucketable. Navigate to item bucket settings stored at /sitecore/system/Settings/Buckets location and create a new rule (Bucketing Strategy: Item Name) for resolving the bucket folder path.
    Create a new product item based on Product template under bucket folder and it will auto organized by item name format.
  3. Bucketing Strategy – Using new item id: Newly created bucketable items will be auto organized into content tree based on item id with five levels. I’ve created a new template MEMBER and made it as bucketable. Navigate to item bucket settings stored at /sitecore/system/Settings/Buckets location and create a new rule (Bucketing Strategy: Item Id) for resolving the bucket folder path.
    Create a new member item based on Member template under bucket folder and it will auto organized by item id format with five levels.
Comments and suggestions are most welcome. Happy coding!

0 comments :

Post a comment