Sitecore Item Bucket
The intent of the article is to give basic understanding about sitecore item bucket.Introduction
Sitecore item bucket allow keeping literally n numbers of items in a bucket as unordered items.
As shown in below screen shot, we have People Directory as bucket and this bucket is having 4 People in it as bucket items. This arrangement let you grow the people directory to have literally n number People in People Directory bucket without having any impact on performance.
Figure : Showing bucket structure ( People Directory with People items as bucketable items)
Figure : Showing bucket structure ( People Directory with People items as bucketable items)
Configure the bucket item
Okay now if i need to make an item to be bucketed, i need to mark this item as bucketable at template level
Figure: Item marked as Bucketable at template level
Enable the bucket
Okay so now we have person item to be used in bucket as bucketable item. Now let's create four person items and bucket them.
As you can see in below screenshot we have created people directory node and four people under people directory node and now to bucket them go to configure tab in the ribbon and click bucket icon.
Figure: Bucket after bucketing
Default Bucketed item path
Okay now we have the bucket and we have notices that by default sitecore take the create date and create a item path in the format of "yyyy MM dd HH mm" same you can find in the Sitecore.Buckets.config in the include folder under the App_Config of your solution
Figure: Showing default item bucket path
Custom bucket item path
Okay now you may thing we are arranging person in bucket so why not make this alphabetically segregated in bucket folders and answer is yes we can, Sitecore out of box gives you functionality to achieve this.
You can set new rule for bucket under “/sitecore/system/Settings/Buckets/Item Buckets Settings” where you can take the advantage of predefined rules. Like we have used one as
Rule 1.
where the new bucketable item is based on the Person template create the folder structure based on the name of the new bucketable item with 1 levels
Figure: item buckets rule
After applying this rule if you sync the bucket again (from configure tab in the ribbon) you will notice now person items are arranged alphabetically in the bucket same is shown in the following screenshot.
Figure: bucket structure after applying new bucketing rule
What next's ?
In next article we see the following.- Custom Item bucket Link manager
- Custom item bucket resolver
- Custom item bucket rule
No comments:
Post a Comment