On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • I’m using WLPE (uncached) to grab a chunk called RegisterPE, which has FormProcessor called (uncached).

    However, when I click Register, and the chunk loads, it loads as if it’s cached (showing the code). I can’t have WLPE run cached, since it won’t do nothing. And if I run FormProcessor cached, it shows up, but it doesn’t parse anything.

    I dunno what to do at this point...
      My Snippets
      -> PopUpChunk v1.0
    • Is WLPE supposed to parse the RegisterPE Chunk before it outputs it? I’ve never looked at the code. It sounds like it’s just doing $modx->getChunk(’xxx’) and not parsing it.
        Mike Schell
        Lead Developer, MODX Cloud
        Email: mike@modx.com
        GitHub: https://github.com/netProphET/
        Twitter: @mkschell
      • Quote from: netProphET at Nov 11, 2008, 06:33 PM

        Is WLPE supposed to parse the RegisterPE Chunk before it outputs it? I’ve never looked at the code. It sounds like it’s just doing $modx->getChunk(’xxx’) and not parsing it.

        I have no idea.

        If not, how would I go about doing that (this could be a good change for WLPE 1.3.2 wink )?

        EDIT:

        /**
        * Template takes a template parameter and checks to see if it is a chunk.
        * If it is a chunk, returns the contents of the chunk, if it is not a chunk,
        * tries to find a file of that name (or path) and gets its contents. If it
        * is not a chunk or a file, returns the value passed as the parameter $chunk.
        *
        * @param string $chunk
        * @return string HTML block.
        * @author Scotty Delicious
        */
        function Template($chunk)
        {
        global $modx;

        $template = ’’;
        if ($modx->getChunk($chunk) != ’’)
        {
        $template = $modx->getChunk($chunk);
        }
        else if (is_file($chunk))
        {
        $template = file_get_contents($chunk);
        }
        else
        {
        $template = $chunk;
        }
        return $template;
        }

        I guess that’s what does the template part I’m looking at...
          My Snippets
          -> PopUpChunk v1.0