Control Sort order of 1I18n Search results - Printable Version +- GetSimple Support Forum (http://get-simple.info/forums) +-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3) +--- Forum: Plugins (http://get-simple.info/forums/forumdisplay.php?fid=13) +--- Thread: Control Sort order of 1I18n Search results (/showthread.php?tid=3259) |
Control Sort order of 1I18n Search results - sarnaiz - 2012-06-08 I need to control the sort order of these results http://s418104665.onlinehome.us/index.php?id=mrast I want the list to display in alpha order by the title of the special page. I tried changing the file name of the .xml to correct the numerical default to force the sort, but that did not work. (e.g. mrast-1.xml to mrast-01.xml) I had an error in the display of the results when the file names were changed. I have read through the forum and the instructions and haven't been able to figure out how to make this happen. I've tried order:reverseurl and mrast order:url HEADER:' ' and also leaving out any reference to an order. Thanks for any help or suggestions! Edit: I would also like to have ALL results on one page. Looked but couldn't find a way to control number of results displayed on a page. It's probably a simple thing, but it's eluding me. ;-) Control Sort order of 1I18n Search results - yojoe - 2012-06-09 If you have a list of items (ul / li) I'd suggest to use one of jquery sort() plugin. Just ask uncle google, and find out what possibilities are available in regards of your case. Control Sort order of 1I18n Search results - sarnaiz - 2012-06-09 Thank you for taking the time to reply with a suggestion. I think though that I just need a bit of code that will call the proper field from the special pages and sort on it and I don't know the syntax. I'm not a programmer. I reply on commented code and instructions to make things work. Control Sort order of 1I18n Search results - Angryboy - 2012-06-10 Hello, sarnaiz. Firstly you needn't resort to renaming the xml files directly because renaming the SLUG of the page will do that automatically for you. So simply changing the slug to mrast-01 will change the xml file to mrast-01.xml -- changing the xml filename directly like you did is also likely the source of the error you picked up, so avoid this where possible (don't worry - I only know this because I've made this mistake before as well xD). Next, if you want alphabetical ordering then simply using order='url' should do the job for you, providing that you've used exactly the same prefix on each slug. So if you want the following to be displayed correctly:
Give each the corresponding slugs:
They should then be displayed in correct alphabetical order. As for displaying ALL your results on the one page, I just set the maximum results displayed to a ridiculously large number. So use max='999' and your problems should be sorted. Hope this helps you, sarnaiz! Control Sort order of 1I18n Search results - sarnaiz - 2012-06-11 Angryboy Wrote:Hello, sarnaiz. Firstly you needn't resort to renaming the xml files directly because renaming the SLUG of the page will do that automatically for you. HI! Thanks for responding. Unfortunately special pages do not have this field: "Custom URL (Slug):" so my only option was to change the file name which gave me the error and did not work. The list of pages is being called by the search function of the I18n module. (% searchresults tags:mrast order:url HEADER:' ' %) EDIT: I should mention you can set a prefix for the special page, but it is not allowing me to have a custom page slug for a special page. Control Sort order of 1I18n Search results - mvlcek - 2012-06-12 sarnaiz Wrote:Unfortunately special pages do not have this field: "Custom URL (Slug):" so my only option was to change the file name which gave me the error and did not work. If you leave Slug/URL empty in the special pages configuration, you can set any slug when you edit your (special) pages. Control Sort order of 1I18n Search results - sarnaiz - 2012-06-12 mvlcek Wrote:sarnaiz Wrote:Unfortunately special pages do not have this field: "Custom URL (Slug):" so my only option was to change the file name which gave me the error and did not work. Thanks mvlcek!! It is now functioning as I needed. I removed my prefix from the custom slug field for the special page configuration. That allowed me to change the page slug for each custom page created with the mRast special page. Then using (% searchresults tags:mrast max:20 order:url %) has the search results all on one page and in alpha order sorting on the page name. http://s418104665.onlinehome.us/index.php?id=mrast Thank you *all* for help with this issue. |