We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37576
    • 5 Posts
    I've searched, but so far no concrete answers for this one... Trying to take a snippet call - [[mySnippet? &id=`123`]] - then split the output, where half can be used, say, back in the resource content, the other half in a chunk, or in the template. In this case, I'm trying to insert an inline link in the resource, then insert some javascript in the footer.

    For now I'm having to use the snippet twice in my resource, once in the content area calling it like &renderin=`body` so it only renders the link, then in a footer TV for that resource calling it like &renderin=`footer` so it outputs only the javascript.

    There must be a better way! Thanks in advance...
    Justin
      • 4172
      • 5,888 Posts
      look into the API - methods

      $modx->regClientScript();


      and

      $modx->setPlaceholder();

        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 37576
        • 5 Posts
        Exactly what I needed Bruno17, thank you!