hi all,
could anyone kindly help me with the following?
I'm trying to create a list of pages, sorted according to the values of two editable regions containing only numbers: "paragraph number" aka para_nr, and an optional "subparagraph number" aka sub_nr.
I'm currently using:
Now if my pages contain the following numbers, the list comes out with the following order: 2, 22, 23.1, 23.2, 24, 3, 4, 54
The subparagraph is sorted in the right way, only containing single digits, but the 3 and 4 from the para_nr field are sorted after 22 instead of before it.
What orderby and order parameters would enable me to sort the numbers in the following ascending order: 2, 3, 4, 22, 23.1, 23.2, 24, 54?
I guess the problem is that the para_nr field which determines the sort order is treated as a string of single number rather than a numerical value. Is there a way to treat it as a whole number?
could anyone kindly help me with the following?
I'm trying to create a list of pages, sorted according to the values of two editable regions containing only numbers: "paragraph number" aka para_nr, and an optional "subparagraph number" aka sub_nr.
I'm currently using:
- Code: Select all
<cms:pages masterpage='index.php' folder=k_folder_name orderby='para_nr, sub_nr' order='asc, asc'>
<li><cms:show para_nr />.<cms:show sub_nr /> <cms:show the_title /></li>
</cms:pages>
Now if my pages contain the following numbers, the list comes out with the following order: 2, 22, 23.1, 23.2, 24, 3, 4, 54
The subparagraph is sorted in the right way, only containing single digits, but the 3 and 4 from the para_nr field are sorted after 22 instead of before it.
What orderby and order parameters would enable me to sort the numbers in the following ascending order: 2, 3, 4, 22, 23.1, 23.2, 24, 54?
I guess the problem is that the para_nr field which determines the sort order is treated as a string of single number rather than a numerical value. Is there a way to treat it as a whole number?