Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • ruditrip Friend
    #167938

    Hi there

    I need to know how to automatically order the dropdown filter items alphabetically as changing the order of them now after all the items is problematic as it will make all the tags incorrect. Or will it? from my experience once cant change the order of extra field tags once docs have been tagged before changing order.

    Can someone please help me add a hack that just orders the items in the dropdown Alphabetically automatically so that when new values are added to an extra field them are not out of order.

    Thanks in advance to the bright spark that helps crack this one.

    deltavector Friend
    #409733

    Hello! I’m also desperately looking for this! Anyone to help?

    jneubauer Friend
    #409734

    have you ordered the options alphabetically in your extra field setup?

    deltavector Friend
    #409735

    jneubauer, THANK YOU so much for the quick reply!

    You see, I wish I didn’t have to sound so dumb but the fact is that I’m sort of new to K2 and by your suggestion, I think your support wouldn’t cover what I need here, since this is not K2 support. Still I beg for your help: I don’t know where to go to find “extra field setup”. All I got is “Settings” and no alphabetical order option I saw there. What I need to be ordered is the content in the dropdown, as show in the screen shot i’m attaching.

    Thank you again!


    1. k2
    ruditrip Friend
    #409756

    <em>@jneubauer 264086 wrote:</em><blockquote>have you ordered the options alphabetically in your extra field setup?</blockquote>

    Hi there. thats the problem i know how to do that but this means reordering these items every time you add another value. All the docs have already been tagged with extra fields and changing the order of extra field options will mess up current tags wont it?

    thanks in advance….please help someone 🙂

    Ninja Lead Moderator
    #409786

    Hi,

    I think there is no easy way since the data of an extra fields has been stored in Json type in the DB, for example:


    [{"name":"Bungalow","value":1,"target":null},{"name":"End of Terrace","value":2,"target":null},{"name":"Detached","value":3,"target":null},{"name":"Flat","value":4,"target":null},{"name":"Semi-Detached","value":5,"target":null},{"name":"Terraced","value":6,"target":null},{"name":"Maisonette","value":7,"target":null},{"name":"Cottage","value":8,"target":null},{"name":"Barn Conversion","value":9,"target":null},{"name":"Land Only","value":10,"target":null},{"name":"Unusual","value":11,"target":null}]

    As you can see the whole string has been saved in to the DB, we have no choice but manually sort items while inserting them.

    ruditrip Friend
    #410558

    Thanks for the reply Hung Nguyen. Does this mean though that i can change the order of extra field item values without affecting the search tags that have been already added to items in k2?

    Thanks in advance

    jooservices Friend
    #410567

    Hi
    In this case we have a solution:
    – Before module render at front-end we make re-sort these data and update back to database.
    Not too much good. But at least we can do
    Thank you
    Viet Vu

Viewing 8 posts - 1 through 8 (of 8 total)

This topic contains 8 replies, has 5 voices, and was last updated by  jooservices 13 years, 2 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum