We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8548
    • 104 Posts
    Hi, I’m trying to sort by pagetitle in the right language.
    I’m using French and English and using the &orderBy=`pagetitle ASC` code in my ditto call (wich is bellow), the sorting works good exept for the fact that it’s ordering the result by french pagetitle, so in the english listing I get the result listed by the french pagetitle.

    Am I missing something or should this code work?

    [!Ditto? &parents=`19` &showPublishedOnly=`1` &tpl=`boisListTPL_en` &display=`all`&total=`all` &id=`(yams_id)` &language=`(yams_mname)` &extenders=`@FILE assets/modules/yams/yams.extender.inc.php` &tagDelimiter=`,` &tagData=`categoryOptions` &tagMode=`onlyTags` &tags=`essences,ebenisterie,planchers,portes,persiennes,jouets,sculpture` &orderBy=`pagetitle ASC`!]


    thanks
    Francis
      • 22851
      • 805 Posts
      This snippet call you posted is ordering the results by the document pagetitle rather than any of the language specific template variable fields. You need to sort by [tt]pagetitle_en[/tt], [tt]pagetitle_fr[/tt], etc. depending on the context. You should be able to achieve this by using [tt]&orderBy=`pagetitle_(yams_id) ASC`[/tt].
        YAMS: Yet Another Multilingual Solution for MODx
        YAMS Forums | Latest: YAMS 1.1.9 | YAMS Documentation
        Please consider donating if you appreciate the time and effort spent developing and supporting YAMS.
        • 8548
        • 104 Posts
        rolleyes it’s so obvious... I must have been baging my head on the wall to hard...

        thaks for your patience grin