Feedback
 
Did this article resolve your question/issue?

   

Your feedback is appreciated.

Please tell us how we can make this article more useful. Please provide us a way to contact you, should we need clarification on the feedback provided or if you need further assistance.

Characters Remaining: 1025

 


Article

Related Data Ordering

« Go Back

Information

 
Article Number000098882
EnvironmentProduct: Sitefinity
Version: 7.x, 8.x, 9.x, 10.x, 11.x, 12.x
OS: All supported OS versions
Database: All supported Microsoft SQL Server versions
Question/Problem Description

How to order in the frontend detail view of a dynamic item the related items associated ? 

Steps to Reproduce
Clarifying Information
Error Message
Defect/Enhancement Number
Cause
Resolution
The results in the Fields collection render the same way you selected them in the backend.

However you can always change the order using linq, however the options are limited, for instance:
 
@foreach (var relatedItem in ((ItemViewModel[])Model.Item.Fields.RelatedPart).OrderByDescending(s => s.Identifier))
{
<li>
<a href='@relatedItem.DefaultUrl'>
@relatedItem.Identifier
</a>
</li>
}


 
Workaround
Notes
Attachment 
Last Modified Date10/8/2019 7:19 PM