We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33982 ☆ A M B ☆
    • 476 Posts
    I’m trying to retrieve content from a MODx Resource with an ID of 33. I’m using MODx 1.04

    I’ve create a t.v. named "middle_content" with the following code in the Input Option Value.

    @SELECT content FROM modx_site_content WHERE id='33'


    I’m calling the t.v. "middle_content" in the template. On the page there is no output even though the resource "33" has content. When I put the @SELECT code in the "Default Value" for the t.v., there is output on the page, but simply "Array" is the output. Anyone had any experience with this?
      Precision Web Development ... SmashStack.com
      • 33982 ☆ A M B ☆
      • 476 Posts
      Found the solution:

      @EVAL return $modx->runSnippet('GetField', array('docid' => 33, 'field' => 'content'));


      You have to have the "GetField" snippet installed for this to work.
        Precision Web Development ... SmashStack.com