Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Ankita 42 posts 62 karma points
    Jun 10, 2012 @ 08:36

    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?






  • Stuart 7 posts 77 karma points
    Oct 16, 2015 @ 11:14

    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...

Please Sign in or register to post replies

Write your reply to: