Search

In my datasource, I have Sorting and Limiting set to sort on a user input integer. However, the resulting XML is sorting the nodes alphabetically, i.e. 1,10,2 etc.

How to change?

I am on version 2.3.4.

All fields that store a 'value', like the Text Input field will store that value as a string. Strings can only be sorted alphabetically, so even if a number is in the field, it still stores it as a string, with a resulting alphabetical sort.

The Number field was created to circumvent this, and allow proper numerical sorting.

Hope this helps.

Thank you for you response. I don't have Number as one of the available fields to add to my section. Should I?

I have:

Author
Checkbox
Date
File Upload
Search Index
Select Box
Select Box Link
Tag List
Textarea
Text Input

Oh, maybe you mean this extension?

http://symphonyextensions.com/extensions/numberfield/

Yep, it's this extension!

Cheers!

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details