Alphabetical sort search results by page name
Permalink
Hello and greetings to the community, my first post here!
Sorry about my english in advance, I´m learning right now the language.
I need my results search page sorted by page name, in alphabetical order. I´m using the built-in search block.
I have a page for every customer under a "suppliers" page, and I need this alphabetical sort so they don´t get mad for the order of appearance (right now this happens by order of creation).
I find something similar in this post, but I can´t properly implement it for the page name:
http://www.concrete5.org/community/forums/customizing_c5/sort-searc...
I tried to replace $ipl->sortByRelevance() with $ipl->sortByName(); but nothing happens.
My knowledge of php is very limited, can someone please advice me the best form of achieve this?
Thanks.
Sorry about my english in advance, I´m learning right now the language.
I need my results search page sorted by page name, in alphabetical order. I´m using the built-in search block.
I have a page for every customer under a "suppliers" page, and I need this alphabetical sort so they don´t get mad for the order of appearance (right now this happens by order of creation).
I find something similar in this post, but I can´t properly implement it for the page name:
http://www.concrete5.org/community/forums/customizing_c5/sort-searc...
I tried to replace $ipl->sortByRelevance() with $ipl->sortByName(); but nothing happens.
My knowledge of php is very limited, can someone please advice me the best form of achieve this?
Thanks.
Hi,
Welcome to Concrete5
You could try this add-on.http://www.concrete5.org/marketplace/addons/a-to-z-pagelist/...
I think it might solve your problem.
Welcome to Concrete5
You could try this add-on.http://www.concrete5.org/marketplace/addons/a-to-z-pagelist/...
I think it might solve your problem.
Thanks for the welcome Stephen :D
The addon is nice, but I need to sort the search results, not a given list.
Looking my text I see maybe I don´t explanied all properly, sorry.
Let my give you an example.
A standard page of customer looks like this:
Content block > Company name:Brig - Location: Madrid
Search for word "madrid" from search block gives 4 results with that location inside the page sorting page names like this: "Brig, Codec, Ars and Blues" in this order. This is how is working now.
What I need is to order the search results page in the output to "Ars, Blues, Brig, Codec". A standard page list block can be sort in alphabetical way with'alpha_asc'. I need the same for search results.
I checked the controller.php of the page_list block and looks like I need to insert a full variable for achieve this in the Search block controller.php, but I lack the knowledge.
Thanks anyway!
The addon is nice, but I need to sort the search results, not a given list.
Looking my text I see maybe I don´t explanied all properly, sorry.
Let my give you an example.
A standard page of customer looks like this:
Content block > Company name:Brig - Location: Madrid
Search for word "madrid" from search block gives 4 results with that location inside the page sorting page names like this: "Brig, Codec, Ars and Blues" in this order. This is how is working now.
What I need is to order the search results page in the output to "Ars, Blues, Brig, Codec". A standard page list block can be sort in alphabetical way with'alpha_asc'. I need the same for search results.
I checked the controller.php of the page_list block and looks like I need to insert a full variable for achieve this in the Search block controller.php, but I lack the knowledge.
Thanks anyway!
Any ideas?
Thanks.