[magnolia-user] Re: sortOptions and Page Templates

2015-08-04 Thread Mariusz Chruscielewski (via Magnolia Forums)
Hi. Solution for that problem is indeed comparator class, but if you want to sort page templates by order that they appear in config, it's a little more difficult. In comparator class you get not a nodes to compare, but SelectFieldOptionDefinition objects, which have more-less just node id (not

[magnolia-user] Re: sortOptions and Page Templates

2015-07-15 Thread Espen Jervidalo (via Magnolia Forums)
Hi The page templates are obtained from the registry already as an unordered list and then their availability is checked one after the other. You can define a comparatorClass on the SelectFieldDefinition under 'modules/pages/dialogs/createPage/form/tabs/tabPage/fields/template' and order the te