We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4295
    • 98 Posts
    I want to get the id and pagetitle from the modx_site_content table based on a SELECT -- like this:
    @SELECT `id`, `pagetitle` FROM `modx_site_content` WHERE `pagetitle` LIKE 'f%'ORDER BY `pagetitle` ASC LIMIT 40;

    And I want to display the result with placeholders -- like this:
    <a href="[~[+id+]~]" title="[+title+]">[+title+]</a>

    I’ve never created a TV but when I put the SELECT above into the default value of a TV, it seems to work. Only how the heck do I get the plain text result into a placeholder? If someone would take a moment to explain, I and all non-programmers reading these forums in the future would be very grateful. Thanks.
      • 25663 MODX Staff
      • 12,272 Posts
      Why not just use the built-in document object:
      <a href="[~[*id*]~]" title="[*pagetitle*]">[*pagetitle*]</a>
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 4295
        • 98 Posts
        Quote from: rthrash at Sep 26, 2006, 09:55 AM

        Why not just use the built-in document object:
        <a href="[~[*id*]~]" title="[*pagetitle*]">[*pagetitle*]</a>

        Yes, but WHERE do you add this placeholder text? How do you get the results to display using the placeholder?