I want get value sort order of a tab from document type and in the same way the properties we placed under each tabs the will show on the same sort order on my page for example:-
I have 3 tabs in Document type as
X ,Y ,Z and have Sort order 3,2,1
In Tab X have 3 properties a,b,c
Tab Y have 2 properties as c,d and so on..
I want on my page Properties are display firstly on tab sort e.g first show tab Z properties and then In tab Z the properties which is first that is shown, In umbraco there is provision that we can change order of property by simple dragging operation in Doc type . And after the dragging operation properties are shown in the content section in the same oders that we made in document type . I want on my page my properties are display in the same way that they are in content section.
Is for this I have to store the sort value of tabs from doc type and corresponding value of the properties under each tab,
How can I get sort value of a tab from document type and sorting value of each properties from doc type?
Then:
foreach (var tab in docType.PropertyGroups)
{
@tab.sortOrder
}
BUT - I'm having trouble getting the property groups returned in a proper order, they always come back sorted by the internal ID, where i want to actually use the sort order to get my propertyGroups in the correct order to begin with...
How can I get value of a tab Sort from Document Type & Property Sort order
I want get value sort order of a tab from document type and in the same way the properties we placed under each tabs the will show on the same sort order on my page for example:-
I have 3 tabs in Document type as
X ,Y ,Z and have Sort order 3,2,1
In Tab X have 3 properties a,b,c
Tab Y have 2 properties as c,d and so on..
I want on my page Properties are display firstly on tab sort e.g first show tab Z properties and then In tab Z the properties which is first that is shown, In umbraco there is provision that we can change order of property by simple dragging operation in Doc type . And after the dragging operation properties are shown in the content section in the same oders that we made in document type . I want on my page my properties are display in the same way that they are in content section.
Is for this I have to store the sort value of tabs from doc type and corresponding value of the properties under each tab,
How can I get sort value of a tab from document type and sorting value of each properties from doc type?
You can access the sortOrder, i'm doing this:
IContentType docType = ApplicationContext.Current.Services.ContentTypeService.GetContentType("NewsletterEdition");
Then:
foreach (var tab in docType.PropertyGroups) { @tab.sortOrder }
BUT - I'm having trouble getting the property groups returned in a proper order, they always come back sorted by the internal ID, where i want to actually use the sort order to get my propertyGroups in the correct order to begin with...
is working on a reply...