1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Passing simple variable to template

Discussion in 'XenForo Development Discussions' started by Marcus, Feb 23, 2012.

  1. Marcus

    Marcus Well-Known Member

    I want to pass a simple variable $testVar to a template but {$testVar} does not work in both templates my_header, body. Here is my code:

  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    I tested your code and it works.

    There must be something else causing the problem. Maybe another listener. Or maybe you are working with the wrong style.
    Marcus likes this.
  3. Marcus

    Marcus Well-Known Member

    Thanks you very much for even testing the code! I am looking into this and will report here where the problem was. Maybe another coder then can read this if he experiences the same.
  4. Marcus

    Marcus Well-Known Member

    For the record, I just tried this one more time and now it works. I don't know why it didn't work in the first place :)

Share This Page