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

    I’m not really php dev, but need to add some functionality I can’t get directly (I mean not in a universal way).
    I’m using the multilingual system ( see here if interested : http://modxcms.com/forums/index.php/topic,29597.30.html ), meaning there are pages in different language parent folder.
    At each moment we know what is the current language (the current $LanguageID wich is also an place holder)

    goal: find a children document of $LanguadeID folder, where the TV named $languageIdentifier will be = "some-known-value"

    I’m trying to use the API function into the language snippet.

    // getDocumentChildrenTVars($parentid, $tvidnames, $published, $docsort, $docsortdir, $tvfields, $tvsort, $tvsortdir);
    $cat_page = $modx->getDocumentChildrenTVars($LanguageID,,,,,$languageIdentifier,,);


    I don’t understand how to use getDocumentChildrenTVars and there’s no example in the wiki.

    Could some one help ?

    Thank you
      Schtroumpf Grognon - Grouchy Smurf
      ---------------------------------
      Faites pas attention.. - Don't pay attention
      http://www.dzi-neo.net
      • 16034
      • 107 Posts
      I think you should use your tv-name as the second argument:
      $cat_page = $modx->getDocumentChildrenTVars($LanguageID,$languageIdentifier);
        MODx snippet-glossary 101:
        Ditto = Content Lister -- Wayfinder == Menu Builder -- Jot = Comment Control