We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 50388
    • 2 Posts
    I am having problems passing snippet variable to chunk.

    Code snippet
    $props = array('checked' => 'checked');
    return $modx->getChunk('tpl.msOrder.outer', $props);

    Variable does get in chunk well but it renders the chunk now and i want him to render the page with the chunk inside. Is there a way that i can push him to the page? If i place a location header he doenst go there, it stops after the return statement.

    Thanx
      • 3749
      • 24,544 Posts
      If I'm understanding you, you'd need to put the snippet tag on the page itself so the processed chunk would appear there.

      A separate snippet could forward the user there with:

      $url = $modx->makeUrl($pageId);
      $modx->sendRedirect($url);
        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