-
AuthorPosts
-
August 29, 2011 at 9:34 am #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.
August 31, 2011 at 12:56 am #409733Hello! I’m also desperately looking for this! Anyone to help?
jneubauer Friendjneubauer
- Join date:
- August 2011
- Posts:
- 141
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 4
- Thanked:
- 23 times in 23 posts
August 31, 2011 at 1:08 am #409734have you ordered the options alphabetically in your extra field setup?
August 31, 2011 at 1:41 am #409735jneubauer, 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!
August 31, 2011 at 6:05 am #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 ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
August 31, 2011 at 11:06 am #409786Hi,
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.September 4, 2011 at 8:13 pm #410558Thanks 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 Friendjooservices
- Join date:
- October 2014
- Posts:
- 8556
- Downloads:
- 0
- Uploads:
- 130
- Thanked:
- 1245 times in 1121 posts
September 4, 2011 at 8:33 pm #410567Hi
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 VuAuthorPostsViewing 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
K2 filter plugin – Automatically order drop down search filter option alphabetically
Viewing 8 posts - 1 through 8 (of 8 total)