We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10522
    • 6 Posts
    Hello everyone,

    I created a template variable named ’test_var’ and assigned it the following line @EVAL echo "this is the test var";

    Afterwards I tried to use this template var in the home page (resource ID 2) using [*test_var*], the first preview of the resource shows the value of template variable perfectly fine, but when the page is refreshed or revisited that value is lost / or the text is not displayed at all.

    Please help me what am I doing wrong in this.

    Thanks
      • 3749
      • 24,544 Posts
      Try:

      @EVAL return "this is the test var";

        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