13

I have a category "Year" in Tridion and it has keyword values listed 1900s-2012. I am trying to access the category in a component via a dropdownlist. The problem is, I am seeing values in dropdownlist in ascending order 1900s-2012. And user has to scroll all the way down to select the current year - 2012. Is there a way I can reorder keyword values in the category so users see the current year first. I have searched quite a bit, but found no answer on the web or in documentation.

Is it possible to specify the ordering in any dropdownlist created from a category used in a component or at the schema level?

double-beep
  • 5,031
  • 17
  • 33
  • 41
Ram Gandhapuneni
  • 566
  • 3
  • 17
  • Off-topic: I never understood why someone wants this kind of functionality. What is so difficult about just typing the year? It's much easier than selecting one. I would just make it a number field and let the user type in the value. You could check it afterwards using the eventsystem. – Albert Romkes Dec 06 '12 at 09:15
  • Could be to use a TaxonomyControl. If you use just type the year you won't be able to use that field on the frontend without writing query code. Also, why would you want to write an added Event if you can avoid it? – SteveW Dec 06 '12 at 13:07
  • 1
    @AlbertRomkes, I think limiting choices can make it easier and faster for authors while also giving implementation control over the values. Personally, I'm spoiled by applications that let me type *or* select values. Outlook, for example, lets you put in almost anything that looks like a date. – Alvin Reyes Feb 04 '13 at 17:50

1 Answers1

9

There is no way to specify the order for a dropdown list without creating an eXtension (should be easy using jQuery).

What you could do is set the default value of the field to "2012" and that way the user has the current year selected and if they need to change to a previous year, they'll scroll up.

SteveW
  • 386
  • 1
  • 5
  • Thanks a bunch Steve. I will try creating an eXtension. Thanks again. – Ram Gandhapuneni Dec 06 '12 at 09:33
  • You may consider using a `DateExtender` as an alternative to a client-side extension. You can recognize that the list-for-a-dropdown is being requested by looking at the `columns` parameter (see http://stackoverflow.com/questions/11938658/what-does-managed-0-in-list-view-xml-mean) – Frank van Puffelen Dec 06 '12 at 13:22
  • Good answer, could we interest you in committing to the [Area 51 Tridion specific proposal](http://area51.stackexchange.com/proposals/38335/tridion?referrer=gPujQMxthNCNn9xqeeO2NA2). Sign up with the same SO account if you have a moment. – Bart Koopman Dec 07 '12 at 16:14
  • You can specific the order of schema selection fields by placing the values *in* the schema itself. The selection won't be re-usable, needs updates over-time, and probably isn't the best practice, though. – Alvin Reyes Feb 04 '13 at 18:00