We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1169
    • 312 Posts
    I need to create a snippet that will place some variables from the system variables similar to site_name. These will be created by me eg. ’site_main_color’
    This will write a file that will be processed by javascript in the <head> section of the HTML.

    Is this possible?

    If page is cached and snippet would this not be processed again until cache is cleared?
      DEVELOPMENT ENV:- Ubuntu 12.04 | MODx Revolution 2.2.8 | LAMP 2i Apache 2.2.22 | Php 5.3.10 | Mysql 5.5.31 MySQL client version: 5.5.31
      • 3749
      • 24,544 Posts
      Sure. A snippet tag gets replaced by the return value of the snippet no matter where it is a and caching works the same there too.
        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