We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25678
    • 36 Posts
    Hi everyone,

    Basic question for you:

    When creating a new template variable, how do I know what number to put in the ’Sort Order’ field?

    (I’ve read the wiki article and the official documentation, but still don’t fully understand. I may be thinking to hard about this).

    Thank you for you help smiley

    -Ruben
      • 4310
      • 2,310 Posts
      The sort order determines the order in which the TV’s are displayed when editing a document.
      For example if you created 4 TV’s and then gave them the (sort order) :
      [*Size*] (3)
      [*Rooms*] (2)
      [*Rent*] (0)
      [*Location*] (1)

      They would display in this order :
      [*Rent*]
      [*Location*]
      [*Rooms*]
      [*Size*]

      It gives you control over what the client sees.
        • 25678
        • 36 Posts
        Thanks bunk,

        Does it matter if you accidentally give a number to a new TV that has already been assigned to another TV? I just don’t know how to assess which numbers have already been assigned to which TVs. I went with zero just to be sure and that seems to work fine. Just want to make sure this won’t cause any problems.

        Thanks for your help!
          • 4310
          • 2,310 Posts
          If two TV’s have the same sort order assigned I think Modx uses the name as the second sorting criteria.