We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5532
    • 251 Posts
    Maybe my chunk/template logic is off.

    I’m basically approaching this thinking that I have a chunk which is placing a template variable onto a page with an @Binding which is telling Modx to get content from the same template variable on document 25. Seems simple to me!

    Could PHx help here and would that be less overhead because it’s a plugin instead of a snippet?

    Yep, grasping at straws now...
      • 5532
      • 251 Posts
      Regarding the @SELECT binding, is "site_content" from the example below a table in every Modx database which holds content?
      @SELECT pagetitle FROM [+prefix+]site_content sc LIMIT 10


      If that’s the case, how would you specify a document to retrieve the TV from (assuming custom TVs are in the same database table as the standard Modx ones)?

      There must be an easier way right?
        • 5532
        • 251 Posts
        @SELECT looks complicated as custom TVs live in different tables to the Modx defaults which means you have to join stuff together - looks scary...
        http://wiki.modxcms.com/index.php/%40SELECT_Binding
          • 5532
          • 251 Posts
          Back onto @Document binding. I found what looks to be an old PDF manual for Modx and it contains statements similar to what I’ve read around the place:
          By adding the [*MySideBar*] variable inside the template we’ll be able to render the content of document 18....

          And this from a german wiki page which I translated into english:
          The returned value is a string containing the content of the document

          Does anyone actually know what is meant by "content" - would that be a specific TV, all TVs or just the built-in Content TV? I think I’ve wrongly assumed @Document would look for the same template variable the @Binding is on for the given document ID...