We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 31471
    • 206 Posts
    <div id="leftmenu"> [[ Wayfinder?startId=`{{ [*Lang*] }}` ]] </div>
    This should mean: get the value of TV "Lang", get the content of chunk of this name, and put its value in the startID parameter of Wayfinder.
    Instead, this one gives an empty ’leftmenu’ div.
    Could someone correct the above expression to work the way I expect it to?
      • 7231
      • 4,205 Posts
      I don’t think that will work, I think that the chunks get parsed before the TVs do so this would not get the correct value (I could be wrong). The way to do it would be to use the @CHUNK binder to associate the tv to a chunk:

      http://www.modxcms.com/chunk-binding.html.

      Or you could either use PHx or a snippet to display the correct chunk. I do not have a grasp on PHx, but to do this with a snippet you could use tvConditional which displays a chunk if a tv condition is true (or false).

      http://www.modxcms.com/TV-Conditional-607.html

      Or you could simply create your own snippet with a switch statement to return the correct chunk.
        [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

        Something is happening here, but you don&#39;t know what it is.
        Do you, Mr. Jones? - [bob dylan]
        • 19164
        • 1,215 Posts
        PHx is all you need.

        <div id="leftmenu"> [[ Wayfinder?startId=`[*Lang:select=`En=12&Fr=34&Ru=77`*]` ]] </div>


        If Lang = En, this returns 12, if Fr - 34 and so on.
          DirectResize 0.9 beta. PHPThumb, sets of configurations, configuration, binded to specific path. No backward compatibility. | DirectResize 0.9. PHPThumb, наборы параметров, параметры, привязанные к определенным путям. Без обратной совместимости.

          Unfortunately, DirectResize project is closed. If you want to continue development, PM me for access to project page on Google Code. К сожалению, проект DirectResize закрыт. Если вы желаете продолжить разработки, обращайтесь через ПМ для получения доступа к репозиторию на Google Code.

          [PLUGIN] DirectResize - as Maxigallery but for single images :: Download :: [url=http://modxcms.com/forums/index.php/topic,21490]
          • 31471
          • 206 Posts
          WOW! That’s what I love MODx for!
          A little bit of correction to your example: the Wayfinder call is only working without spaces inside the [[ and ]]. huh
          Anyway, it’s a great solution, thank you very much!
            • 19164
            • 1,215 Posts
            Of course, without spaces, i think you know so simple things. I just copied yours part of the code.
              DirectResize 0.9 beta. PHPThumb, sets of configurations, configuration, binded to specific path. No backward compatibility. | DirectResize 0.9. PHPThumb, наборы параметров, параметры, привязанные к определенным путям. Без обратной совместимости.

              Unfortunately, DirectResize project is closed. If you want to continue development, PM me for access to project page on Google Code. К сожалению, проект DirectResize закрыт. Если вы желаете продолжить разработки, обращайтесь через ПМ для получения доступа к репозиторию на Google Code.

              [PLUGIN] DirectResize - as Maxigallery but for single images :: Download :: [url=http://modxcms.com/forums/index.php/topic,21490]
              • 31471
              • 206 Posts
              laugh
              Thanks Metaller!