We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36820
    • 31 Posts
    Now after coming to the closing stages of that website my customer wants that introtext as a richtext field in order to be able additionally to add website addresses using TinyMCE.
    The problem is:
    Output of that text is not shown on Ditto listing at all as soon as any HTML is added into that introtext field but it works as long as there is only text.
    Output is also shown as long as there is only text and no special character like the german ü in that text. In that case the text is shown just to that position before that special character.
    What can I do to make YAMS work if I use a richtext for introtext?

    Thats how it looks like in the chunk.
    [[YAMS? &get=`text` &from=`de::[+introtext_(yams_id)+]||en::[+introtext_(yams_id)+]`]]
    


      • 36404
      • 307 Posts
      hi,

      well, two different things
      - why not create your own tv in this case, using the RTE, i've never had any problem with this (just name it differently)
      - your yams call to get the tv is a little heavy (not to say weird smiley), why not
      [[YAMS? &get=`tv` &from=`introtext`]]

      i have this working in a lot of chunks/templates... the get=`text` aiming at dealing with strings actually

      have swing
        réfléchir avant d'agir
        • 36820
        • 31 Posts
        Hi and thank you for your quick answer. I would like to use that &get=`tv` but it does not work.

        It works If I only use that placeholder in the chunk without that YAMS call
        [+referenzintro_de+]


        but it does not work if I use it in the YAMS call.
         [[YAMS? &get=`tv` &from=`[+referenzintro_de+]`]]

        or any other construction like the one you suggested.

        Now I also have created a TV called referenzintro_en, but I dont know how that should work by using your call.

        I dont remember why I used throughout all chunks &get=`text` inside that YAMS calls, maybe because &get=`tv` did and still does not work.
        [ed. note: universal_next last edited this post 15 years, 1 month ago.]
          • 36404
          • 307 Posts
          hi,

          well it's funny, normally the yams call should be
          [[YAMS? &get=`tv` &from=`referenzintro`]]


          in a chunk you can also try this
          [[YAMS? &get=`data` &from=`referenzintro` &docid=`30`]]

          docid being the id of the ressource you're using the chunk in, if this chunk is called through a snippet just give the id to the snippet as a parameter, eles if you just use
          {{chunk}}
          in the template, it should do it as it is

          have swing
            réfléchir avant d'agir
            • 36820
            • 31 Posts
            thank you for explaining. I already knew all that because it took me a long time last year to understand how YAMS works but I never managed to make it work using something else than &get=`text` in a YAMS call.

            Here is what I am using in that matter.
            [[tvExplorer? &dittoName=`Ditto` &formTPL=`RefSearch` &dittoSnippetParameters=`tpl:ReferenzenListe|debug:0|paginate:1|depth:4|parents:5|display:20|dateSource:Referenzdatum|showPublishedOnly:1|orderBy:Referenzdatum DESC`]]
            [+tve.searchForm+]
            


            and in that chunk named "ReferenzenListe", is that call for that tv "referenzintro" set as RTE. That chunk is used for a Ditto call.
            I use it in the way shown on my first entry on top of that page because I use the same chunk for all languages.
            Please remember everything works fine if I use &get=`text` but only as long as there is no HTML in that RTE field given.

            What can YAMS cause not to show the content of a TV by only changing the call to &get=`tv`?

            I use modx 1.0.4 and YAMS 1.2.0 RC3.
            I dont think there is something wrong on the setting of YAMS on the configuration tab or other settings.

            [ed. note: universal_next last edited this post 15 years, 1 month ago.]
              • 36404
              • 307 Posts
              hi,

              yes i understand tat yams behaviour may sound strange in this kind of situation, that's why i suggested the get data instead, something that works well in many chunk situations

              something else, i don't know tvExplorer (never used it) but according to what i see the call is lacking something important to have ditto and yams working fine together, the YAMS extender, the yams_id and the language

              a ditto call would be
              [!Ditto? &id=`(yams_id)` &language=`(yams_mname)` &extenders=`@FILE assets/modules/yams/yams.extender.inc.php`//and so on..


              that may explain why the simple and usually working get data from tvname doesn't work here, too bad, here, i can't help to say where to pass those through tv explorer

              have swing

              edited, forgot to say that be the problem with html in the get text are all the special chars , you would run into exactly the same problem with a string containing any tag, that's why i imagined my own language file system with yams for when i need a little more complex strings containing html, quotes or else [ed. note: virtualbear last edited this post 15 years, 1 month ago.]
                réfléchir avant d'agir
                • 36820
                • 31 Posts
                thanks for you help.
                I used that yams_id and so on in tvExplorer on the &dittoSnippetParameters part but it did not change anything.
                Can you tell me what is mandatory on YAMS if you want to use &get=`tv` or &get=`data`?

                Could it be that this output problems have nothing to do with YAMS but with tvExplorer?


                  • 36820
                  • 31 Posts
                  Okay I made it work.
                  All I did in the chunk was only to add &docid=`[+id+]` and use &get=`data`
                  [[YAMS? &get=`data` &from=`introtext` &docid=`[+id+]`]]


                  By the way I left my tvExplorer call just as it was
                  [[tvExplorer? &dittoName=`Ditto` &formTPL=`RefSearch` &dittoSnippetParameters=`tpl:ReferenzenListe|debug:0|paginate:1|depth:4|parents:5|display:20|dateSource:Referenzdatum|showPublishedOnly:1|orderBy:Referenzdatum DESC`]]


                  Thank you for all your help