Hello,
I have a large archive list that is built utilizing channel entries and it has up/down buttons in a few key rows that allow the user to dynamically sort the data according to the column and asc/desc. I would like that functionality to work on the search results page as well.
I have a simple search form which send the user to a search results page with the same code, but I cant figure out how to get the special encoded search string in segment_3 of the URL into the {path="my-path/search_results"} EE tag that is in the form that controls the dynamic sorting.
So my button form code looks something like this:
<form method="post" action="{path='employees/archive-search-results'}">
<input type="hidden" name="csrf_token" value="{csrf_token}" />
<input type="hidden" name="orderby" value="year_published" />
<input type="hidden" name="sort" value="asc" />
<input type="submit" value=""/>
</form>and the URL on the search results page looks something like this:
www.website.com/employees/archive-search-results/6fb1bbfc8c192cc69b7894f73685bf7c/
So I guess I need to find a way to get the segment_3 (6fb1bbfc8c192cc69b7894f73685bf7c) string into the method=”post” action=”{path='employees/archive-search-results/??????????????????????????'}”> form code.
Any ideas? recommendations?
yea i had looked at them and they are just too beefy…. the simple search results are great and just what I need, i was just hoping to get this little issue fixed. I can always remove the sort buttons, its not like the results are that hard to glance through.
The other thing i was looking at was resubmitting search keywords when one of the sort buttons is pushed. Are sort and sort_by even an option int he search results? I just cant seem to find much information on the search results page?
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.