We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12483
    • 8 Posts
    hi all, I need some help about template variables using.

    I need to load a variable into every page before header, well I just don’t know how I could do it.

    e.g.

    [in this point I need to load variable x]
    {{Header}}
    [*#content*]--->in the content are loaded variables such as x,y,z
    {{Footer}}

    the variable is text-ype

    thanks to all
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      [*TV-Name*]
      {{Header}}
      [*content*]
      {{footer}}

      The [*content*] document variable contains the content field from editing the document. [*TV-Name*] will contain whatever you put in the TV either as default value when creating the TV or when you edit it for the document.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 12483
        • 8 Posts
        that’s ok, but how can I load a variable from db?

        I’ve tried to load a variable putting it into the default value but nothing happens :/