We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7231
    • 4,205 Posts
    Quote from: heliotrope at Feb 06, 2008, 07:19 AM

    Hi,

    the aim of the snippet is to display the name of tv options (Oui==1||Non==2)
    [*tv*] will return 1 or 2 but If you’d like to display Oui or Non you need the snippet above.


    I’ve written another piece of code based on tvEditor class to make the same result but with better support of @BINDINGS in tv elements.
    As it is a phx modifier you can use it in any case.

    :-)
    OK, that makes sense grin I could have used this a while back, I ended up writting a snippet to retrieve the name based on the value. Since the TV was populated by document tree it was easy to get the name. But in this case with a pure TV this will be a great tip. Thanks for the explanation grin grin
      [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't know what it is.
      Do you, Mr. Jones? - [bob dylan]