We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19159
    • 13 Posts
    hi there

    i see, that yams output is not directly usable in a snippet, for example if i try to explode it’s content (comma seperated) to create a list:

    $params=array();
    $params['get']='data';
    $params['docid']=$current_id;
    $params['from']='table_content';
    $yams_return = $modx->runSnippet('YAMS',$params);
    
    $list = explode("," , $yams_return);


    how can i get clean content from yams? i tried to pass the lang_id to my snippet and then i could use a custom modx db query, but somehow i can’t pass the proper variable, with this command:

    [[get_table_content? &langid=`(yams_id)`]] (cached and uncached)


    $langid is always empty if i pass it, in the template html it outputs the correct ending, for example de or en

    any help would be apreciated. thx
    m

      • 19159
      • 13 Posts
      i really don’t get it, i tested it over and over again. something seems buggy

      my demo snippet to pass the language to the snippet:
      [!get_table_content_de? &input=`output` &lang=`(yams_tag)`!]


      if have three languages en/de/fr (de=>default)

      if i pass it with (yams_tag), there will be no output.

      i i pass static input, like "de", there is output. it seems that processing snippets with yams breaks something, though no error output, just no output.


      what can this be? just simply use yams in html-templates works like a charm, but i need the language in order to process language specific tvs.

      i can not find any solution, though what i try accomplish is mentioned as the way to do, in some forum posts here.

      any ideas also for debug?

      my system:
      MODx-Version 1.0.4
      Versions-Codename rev 6981
      Datenbank-Version: 5.0.67-0ubuntu6.1
      PHP Version 5.2.6-2ubuntu4.6
      Apache/2.2.9 (Ubuntu) DAV/2 SVN/1.5.1 PHP/5.2.6-2ubuntu4.6 with Suhosin-Patch mod_ssl/2.2.9 OpenSSL/0.9.8g


      any help really appreciated.
      m