We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6335
    • 20 Posts
    We have a site that is broken into 4 main sections that pull menu content from a container, where each section can have one or more of the menu items in the container. To do this, we use template variables and snippets to tell wayfinder what menu items to display. Everything is working except that we need to store the currently-selected section in the session, so if the user navigates to the first section, that section is stored in the session while the user navigates to sub-page content; when a new section is selected, the session variable is updated and the user continues to navigate the new section menu content. We do this because menu content can be shared between sections and this help us prevent redundant content.

    We have an issue with the session snippet and nesting requirement for caching. Here is an example snippet call to Wayfinder:

    [!Wayfinder? &startId=`27` &level=`1` &ignoreHidden=`TRUE` &outerClass=`menu left` &includeDocs=`[[GetWingMenuItem? &industry=`[[IndustryCheck? &id=`[*id*]`]]` &wing=`Left` ]]` !]

    We alternate caching, starting with uncached to wayfinder, then cached to GetWingMenuItem (this snippet determines what resources in the main menu container should be included in the wayfinder call). The GetWingMenuItem returns the menu items based on what section (industry) the user has selected, so IndustryCheck is the snippet that gets and/or sets the session variable (setting occurs when one of the 4 main section pages are accessed, getting always occurs). The problem is since we want the wayfinder to be uncached, we have to cache the GetWingMenuItem and IndustryCheck (we tried uncaching them, we get an error). As such, we don't always get the right value from the session, which we suspect is due to caching.

    How can we enforce non-cache of all of these snippet calls, we don't want any caching for this logic, the site is fast enough as-is? If we try to mark either Industrycheck or GetWingMenuItem as uncached, we get errors or incorrect functionality, the above line is the only way everything executes properly, with the issue that the session does not always return the right value.

    Thanks for any suggestions you can offer. We can provide examples and source as needed.
      • 9207 ☆ A M B ☆
      • 2,475 Posts
      You're using Evo? The caching options aren't as thorough, unfortunately....
        • 6335
        • 20 Posts
        Yes, we are using evo. Unfortunately, we could never get rev to install on the server, we downloaded it and when we loaded the setup, it always went to white blank page. None of the troubleshooting steps we encountered helped, I imagine something with PHP but could not diagnose the problem. Evo installed fine and we've been using that.

        Any suggestions at all?
          • 6335
          • 20 Posts
          I figured out how to get around this, by removing the third nested level (having the nested snippet process the session variable). I would agree an upgrade to revolution is the best solution, but it worked for me to combine snippets requiring only one nested level.
            • 9207 ☆ A M B ☆
            • 2,475 Posts
            Yeah, the caching stuff there can get weird. Sometimes it helps if you isolate bits of it into separate TVs, then put the TV-tags into your Snippet, or just write your own Snippet so you avoid the nesting.

            Revo does require more out of the server... but usually there's something in the logs when an install fails.