How to Create Item Buckets in Sitecore CMS

March 17, 2015

Blog | Development | How to Create Item Buckets in Sitecore CMS
How to Create Item Buckets in Sitecore CMS

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.

Note:

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.

First create a new template in /sitecore/templates/User Defined named “Listing Page” that extends the “Page” template.

Then create __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.

Select the /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”.

Note

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.

Tim Leverett

Senior Developer
Tags
  • Sitecore
  • Tutorial
Sitecore Survival Guide Volume 1

If you found this post helpful, there are plenty more where it came from! You'll find the first 10 here.

Download the first 10 posts in our Sitecore how-to series by Developer Tim Leverett!

Configuring Items for the Bucket

Select the /sitecore/templates/User Defined/Article template and create __Standard Values.

Expand the "Item Buckets" template section on the newly created __Standard Values item.

Note

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

Select the /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!

Recent Work

Check out what else we've been working on