We've a folder item which stores all new artciles. This item is bucketable. But after turning into a bucket, we are not able to find previous and next sibling of an item under bucket. The below code wouldn't work as the item is under bucket now:


But what's the simplest way to fetch an item's previous and next item in bucket hierarchy?


That is not how Sitecore buckets works. See the Sitecore documentation here:

When you store items in an item bucket, the parent-to-child relationship between the items is removed, and instead the items are organized in a folder structure according to the date and time they were created. Therefore, the item buckets feature is primarily designed for storing content items that do not need to be stored in a hierarchy.

It's a quote from https://doc.sitecore.net/sitecore_experience_platform/content_authoring/managing_items/item_buckets/item_buckets

As you read, buckets are designed for items that do not need to be stored in a hierarchy. Which means that you should only decide to keep items in a bucket if you don't need to know relations (like parent - child - sibling) between items as there is no longer hierarchy like before converting a tree into a bucket.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.