We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 31074
    • 14 Posts
    I have a TV set as url wich works fine with extern url’s, but I want it to list the site pages too.
    Problem: I haven’t got a clue how... Anyone??
      • 27330
      • 884 Posts
      put
      [~1~]
      

      in the URL field where 1 is the document ID.
        • 31074
        • 14 Posts
        thanks for your answer, but that’s not the one i’m looking for.
        This would only be an option if i was the site-editor, but other people are going to edit the site in the end and they ned to see a list op existing pages instead of an empty url-field...
          • 27330
          • 884 Posts
          sorry didn’t get you right.
            • 10487 MODX Staff
            • 1,535 Posts
            @unleaded: Real nice snippet, ddTree, to use in conjunction with a TV - just follow the instructions to get going (I quickly tested on Evo 1.0 as well and no issues found). The snippet just returns the ID of the page though, so bear that in mind - although a simple hack would get the output be like: [~1~]

            Now, this would render the dropdown, but wouldn’t allow you to enter external URLs - so if you needed external URLs, you’d possibly need a second TV for entering an external URL and have a snippet on the frontend to detect which TV should be rendered.
              Garry Nutting
              Senior Developer
              MODX, LLC

              Email: [email protected]
              Twitter: @garryn
              Web: modx.com
              • 31074
              • 14 Posts
              Thank you Garryn! That was exactly what I was looking for! Much obliged!!!
              And Sinbad... no problem, the effort is appreciated!! smiley