We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38846
    • 30 Posts
    I searched in the forum for this, but wasn't sure how to word it and found nothing of hand that addressed it.

    What I would like to do is add a global function to a template that allows me to turn off and on tracking say with Google on all resources using that template. Currently I have a TV that is attached to the template doing this but it is to time consuming to go into each resource and turn off and on tracking on each.

    I would however like to retain the ability to still individually control on each resource by leaving the TV in place. [ed. note: last edited this post 14 years, 7 months ago.]
      • 3749
      • 24,544 Posts
      It sounds like you want an @INHERIT TV. You can set the default value to:

      @INHERIT


      and any doc with the TV empty will inherit the value from the nearest ancestor with it set.

      You can add a default value after @INHERIT to make that the default if no ancestor has it set:

      @INHERIT 1



      You can still set the value in any doc to override the inherited setting.

      ---------------------------------------------------------------------------------------------------------------
      PLEASE, PLEASE specify the version of MODX you are using . . . PLEASE!
      MODX info for everyone: http://bobsguides.com/modx.html
        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
        • 38846
        • 30 Posts
        Right on, that sounds about right. I will give that a go. Thank you.