We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 35471
    • 9 Posts
    The content of the document is parsed correctly (when using [*content*]), if viewed as a page, it contains these snippets:
    Uncached snippet call: [!getPrefix?main=`design`&sub=`flags`!]
    Cached snippet call: [[getPrefix?main=`design`&sub=`flags`]]


    Which means that it will come out like this:
    Uncached snippet call: new_design/images/design/icons/flags/
    
    Cached snippet call: new_design/images/design/icons/flags/


    But when I get the content through the snippet below:
    $out = $modx->documentObject['content'];
    return $out;
    

    This is the output:
    Uncached snippet call: [!getPrefix?main=`design`&sub=`flags`!]
    
    Cached snippet call: new_design/images/design/icons/flags/
      • 21257 MODX Staff
      • 730 Posts
      Are you calling this snippet cached or uncached? And is the resource cacheable?
      Quote from: MentalButcher at Jul 22, 2011, 05:44 AM

      $out = $modx->documentObject['content'];
      return $out;
      

        Mike Schell
        Lead Developer, MODX Cloud
        Email: [email protected]
        GitHub: https://github.com/netProphET/
        Twitter: @mkschell
        • 6228
        • 249 Posts
        I believe you need to use the $modx->getDocument function to fetch parsed content, something like so:
        $modx->getDocument($docid, 'content');
          lo9on.com

          MODx Evolution/Revolution | Remote Desktop Training | Development
          • 35471
          • 9 Posts
          Apparently it works if I call the below snippet uncached, don’t know why this is, but I am guessing there is some sort of procedural bug, or it is intentional that you can’t call an uncached snippet if it’s not cached. smiley
          $out = $modx->documentObject['content'];
          return $out;