Forum for discussing general topics related to Couch.
16 posts Page 2 of 2
@richie,

The old method of simulating tags, which you are using, has all the tag values in a single field e.g. 'Pune, Goa' and 'Goa, Mumbai, Pune'.

As should become apparent from the example strings above, we can find a particular tag in the strings (e.g. 'Goa') but we cannot sort on that value because the value can possible be at any position in the strings.

So, I am afraid, the answer is no.
I think you got me wrong. I'm not wanting to sort on basis of tags.
I want to sort on the basis of the value selected in the dropdown which has no relation to tags.
I want to capture the value selected in dropdown and use it to sort the list.
Yes we can use values from a dropdown to sort pages.

Sorting is done on the basis of a field (i.e. editable region) e.g. this code will sort pages using an editable region named 'my_city'
Code: Select all
<cms:pages orderby='my_city' >
   <cms:show k_page_title /> - <cms:show my_city /> <br/>
<cms:pages>

Assuming your dropdown offers various fields to use for the sorting, you can use the submitted value like this where 'frm_my_order' variable contains value submitted through a dropdown named 'my_order' -
Code: Select all
<cms:pages orderby=frm_my_order >
   ..
<cms:pages>

Hope this helps.
thanks but actually i'm not getting how to pull that value from dropdown and set it as a variable. :(
Please see viewtopic.php?f=8&t=7620 - plenty of dropdowns in there :)
I'm sure you'll be able to adapt that example for sorting.
Yes thank you that is very informative , although I'm facing this issue
viewtopic.php?f=4&t=8130&p=14270#p14270 which is not letting me search correctly. Pls see this.
16 posts Page 2 of 2