We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8416
    • 173 Posts
    Hello,
    I’ve created a TV that let me choose between a "Book Now" or "Call Now" button with a link associated.

    The input type is Radio, the input Option Values are:
    <input type="image" OnClick="window.open('http://www.test.ca/index.php?id=1449')"  src="/assets/templates/test/images/book.gif" alt="Book Now" />||<input type="image"  OnClick="window.open('http://www.test.ca/index.php?id=1449')"  src="/assets/templates/test/images/call.gif" alt="Call Now" />
    


    I’d like to be able to edit the link (’http://www.test.ca/index.php?id=1449’) instead of having it hard-coded. Can I use a nested TV? What is the best way to go about this?
    Thanks for any help...
      • 36592
      • 970 Posts
      Quote from: echaland at May 28, 2008, 08:11 PM

      Can I use a nested TV?
      Trying it must be the best practice, I believe. grin
      There are lots of ways in MODx to achieve one thing.

      In my test on WinXP/XAMPP/MODx 0.9.6.1p2, nested TV worked no problem.
      And chunk also worked !
      I tested like the code below.

      Book Now==<input type="image" OnClick="window.open('[*testTV*]')"  src="/assets/templates/test/images/book.gif" alt="Book Now" />||Call Now==<input type="image"  OnClick="window.open('{{testChunk}}')"  src="/assets/templates/test/images/call.gif" alt="Call Now" />
      
        • 8416
        • 173 Posts
        Thanks. That works fine!