2

I have filter which filters content on a field e.g. 'topic' (art, sport, food). I display this as an horizontal accordion which slides out and the user can select a topic to narrow the search results.

This all works well but how do I custom order the field 'topic' in a custom manner? I'm guessing by adding an order column but the field is a property of the article.

Any ideas will be much appreciated.

4
  • Do you mean in Solr? Could you please add some screenshots? Commented Aug 26, 2021 at 10:52
  • I don't have access to Solr in this instance. I only have access to Content Editor. I'm rendering an accordion which visually looks as follows: i.ibb.co/sVx0YrX/ordering.png I need to re-order them to put 'Beverage' last. These properties are a field in content I have created. Commented Aug 27, 2021 at 8:05
  • Does it mean you are Sitecore to get Meal Type? Commented Aug 27, 2021 at 9:11
  • Yes Swati, MealType is a field on an object I created in SiteCore. Basically, I'm filtering on it. Commented Aug 30, 2021 at 7:32

2 Answers 2

1

MealType field in your article should take a tree location as it's data source. I.e.

Sitecore/content/shared/meal type

  • breakfast
  • lunch
  • dinner

You should be able to use the content editor to manually rearrange the sort order of the items.

Then when you come to output your front end accordion, you should be able to sort the results on custom sortOrder field.

This answer here talks about this in some detail: https://stackoverflow.com/questions/28700504/how-does-sitecore-sort-items-in-the-content-editor-tree

0

You can use tree list to do sorting, and you can select Beverage at last. Samething you can do for other Topics

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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