We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22739
    • 11 Posts
    I’m hoping someone could shed some light on cached vs. non-cached with getPage and getResources.

    The only way I can get my results to display is if I call getPage as cached:

    [[getPage? &element=`getResources` &parents=`8`]]

    The documentation specifically says to DO NOT cache and I’ve noticed that pagination doesn’t work when calling it cached. Any ideas as to why I get no results when I use [[!getPage]] but do when I use [[getPage]]?

    thanks in advance.
      • 22739
      • 11 Posts
      Just a follow up. It seems as though other snippets of mine are also not working when using the do not cache token. For example, [[If?]] works, but [[!If?]] does not. Anyone have any ideas why my snippets will only work if cached?
        • 9995
        • 1,613 Posts
        I had some difficulties too with getpage at first, this seems to work with me:
        (my main page is being cached, i use [[!Wayfinder? )
        [[!getPage? &elementClass=`modSnippet` &element=`getResources` &parents=`20` &depth=`3` &limit=`4` &pageVarKey=`page` &includeTVs=`1` &includeContent=`1` &showHidden=`1` &tpl=`chunk-with-content-here`]]
        
        <div class="paging">
        <ul class="pageList">
          [[!+page.nav]]
        </ul>
        </div>


        Maybe u can use this instead of If:
        [[*id:is=`15`:then=`[[$some-chunk]]`:else=``]]
        [[*parent:is=`19`:then=`<br><a href="[[~19]]">Back »</a>`:else=``]]


        Hope it helps.
          Evolution user, I like the back-end speed and simplicity smiley