How to Create Item Buckets in Sitecore CMS
March 17, 2015
This is the 23rd installment of our series about learning how to use and develop for Sitecore CMS, and the follow-up post to “How to Extend Multiple Templates in Sitecore CMS”.
In this post, I cover how to create item buckets to better manage large amounts of organized content, such as news articles or blog posts. Items added to item buckets are organized automatically based on their contents. The item bucket itself provides a search page which is used to quickly access items within the bucket, rather than navigating a deeply nested content tree.
This tutorial will expand on the templates that were updated in “How to Extend Multiple Templates in Sitecore CMS”.
Creating the Bucket
For this example, I will be creating a “Listing Page” template to be a bucket that contains Articles.
__Standard Values for the new template and select the newly created
__Standard Values item.
Open the “Configure” tab of the ribbon and click the “Bucket” button in the “Buckets” group.
A dialog will appear requesting confirmation.
Click “OK”, and wait patiently while Sitecore turns the item into an item bucket.
When Sitecore’s finished turning the item into a bucket, the item will show a search tab in the editor.
While the Listing Page’s standard values are selected, add the “Article” template as an insert option.
/sitecore/Content/Example/Home item, and create a new Listing Page item named “Artilces”.
Create a new article item in
/sitecore/content/Example/Home/Articles named “Test Article”.
The newly created item will warn that the article is “unbucketable”. This was done intentionally to serve as an example. Unbucketable items will be shown in the Sitecore tree.
Stay up to date with our email updates!
Configuring Items for the Bucket
/sitecore/templates/User Defined/Article template and create
Expand the "Item Buckets" template section on the newly created
__Standard Values item.
A number of the fields in this section say "Do not set manually". Heed this advice.
Check the "Bucketable" field and save the changes.
Article items will now be bucketable.
Tidying the Spillage
/sitecore/content/Example/Home/Articles/Test Article item again, and note that the warning message is no longer displayed. There are still issues with the item, however. It was created before it could be properly organized by the "Articles" bucket.
To fix this, select the
/sitecore/content/Example/Home/Articles item, and click the "Sync" button in the "Buckets" section of the "Configure" tab.
Expanding the "Articles" item now will show a message instead of the bucketable items.
To select items in the bucket, search for them using the search tab on the bucket.
Check back next week for the next tutorial. And, as always, if you have any questions or if there's something you'd like to see covered, drop us a line!