We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30585
    • 833 Posts
    @BobRay and @microcipcip , thanks for seeing that. It makes a lot of sense now.

    I did declare the $id in the snippet, just before $tvval, but it didn't work. I should also point out that I'm using getresources via getPage@Pagination. Is that a problem
      A MODx Fanatic
      • 30585
      • 833 Posts
      @BobRay, I've changed the code a bit per Bob's guide @ http://bobsguides.com/revolution-objects.html

      <?php
      
      //Get TV Value
      $tv = $modx->getObject('modTemplateVar',array('name'=>'PreviewImage-Messages'));
      
      /* get the raw content of the TV */
      $rawValue = $tv->getValue($id);
      
      /* get the processed content of the TV */
      $processedValue = $tv->renderOutput($id);
      
      //Get poster path
      $poster_path = pathinfo($processedValue);
      
      //Output thumb path
      return $poster_path['dirname'] . "/thumbs/" . $poster_path['basename'];
      ?>


      I know we're a step closer. Can you tell me what I'm missing? [ed. note: treigh last edited this post 14 years, 4 months ago.]
        A MODx Fanatic
        • 30912
        • 463 Posts
        @microcipcip doh so it is smiley
          • 3749
          • 24,544 Posts
          You should always get a snippet working on its own before bringing getPage into the picture. There's no reason to make things more complicated than they need to be. Once it's working the way you want, it's easy to convert to a getPage call.


          Without knowing exactly what's in the TV and what kind of TV it is, it's hard to help further.


          ------------------------------------------------------------------------------------------
          PLEASE, PLEASE specify the version of MODX you are using.
          MODX info for everyone: http://bobsguides.com/modx.html
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 30585
            • 833 Posts
            Thanks guys. I've tried all we could think of, but nothing is giving. So I won't waste any more time on this. I'm opting for a plan B: Manually adding those paths. It sucks, but it's worth it.
              A MODx Fanatic
              • 3749
              • 24,544 Posts
              The good news is that with the hard-coded paths, the page loads will be significantly faster. wink



              ------------------------------------------------------------------------------------------
              PLEASE, PLEASE specify the version of MODX you are using.
              MODX info for everyone: http://bobsguides.com/modx.html
                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting