We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 35764
    • 35 Posts
    Hi,

    I want to output the values from a checkbox TV - any ideas how to do this. I only want to display the checked values.

    My checkbox TV lists the resources of a certain parent. The user then selects multiple values using the checkbox. I then want the checked values to display as a list with links to the relevant resource.

    Thanks for any help.

    :Lisa
      • 4172
      • 5,888 Posts
      make sure the output of your TV is a commaseperated list of resource-ids.
      [*yourTV*]


      should output something like that:

      20,25,30,45



      Then you can use this TV together with Ditto to create a list of links.

      [!Ditto? &documents=`[*yourTV*]` &tpl=`yourTpl`!]


      the chunk yourTpl with something like that:

      <li>
      <a href="[~[+id+]~]">[+pagetitle+]</a>
      </li>




        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 35764
        • 35 Posts
        Thank you it works, but for some reason it is only showing 2 of the links - any ideas?

        thanks

        Lisa
          • 35764
          • 35 Posts
          if i just output [*mytv*] then i get the correct comma separated list e.g 2,45,67, but for some reason when i use the ditto with the tpl I only get 2 results displayed. thanks again
            • 35764
            • 35 Posts
            sporry fixed, it was me smiley

            Thanks again!! smiley