We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • YAMS provides support for sorting language-specific TVs by the ’Sort order’ value on the "Create/edit Template Variable" page.

    We never use this when creating template variables and control the sort order on each template ("Create/edit Template > Assigned Template Variables > Edit the TV sort order"). This patch provides support for this.

    No attempt has been made to support both approaches to sorting - I cannot at present think how this would work.

    The patch has been made against YAMS 1.2.0RC3.
      MAPLEDESIGN MODX development and MODX web design and custom development. Proud to serve UK and International clients!
      • 22246
      • 2 Posts
      The patch has been made against YAMS 1.2.0RC3.

      Hi Peter,
      it works perfect for me, on yams 1.1.9
      Thank you so much ;]

        • 22448
        • 241 Posts
        Thanks Peter for the patch.

        As i was trying to reclaim the full control over the multi-lingual tvs i noticed that yams.mm_rules.inc.php partitioned tvs into the standard and custom lists with the order in the standard list being hard-coded. Since we had to repurpose some of the standard fields to use for SEO purposes the default order was not appropriate anymore. So i modified the logic to put all TVs into $customTVs array and then sort by the rank as provided from your modification above.
        Modified yams.mm_rules.inc.php file is attached below.

        This way the order of all fields and TVs is completely customizable. To simplify TV management even further i recommend ’TV on Template’ plugin (http://modxcms.com/extras/package/?package=589), which allows to assign and reorder TVs directly from the template. No more jumping back and forth.

        Power to the people...