We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3749
    • 24,544 Posts
    If you’d like a list of the pages on your site that are not set as cacheable, this snippet will give you a quick list:

    Call it PagesNotCached, create a uncached page (so you’ll have at least one on the list and will know it’s working), and put this tag on the page:

    [[PagesNotCached]]


    <?php
    $output = '<h3>Pages Not Cached Results</h3>';
    $pages = $modx->getCollection('modResource',array('cacheable'=>'0'));
    
    if (empty ($pages)) {
    
        return 'No uncached pages found';
    
    }
    foreach ($pages as $page) {
    
        $output .= '<br />Page' . $page->get('pagetitle') . ' (' . $page->get('id') .  ')';
    
    }
    return $output;
      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