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

Pulling Template Into A Variable

Discussion in 'XenForo Development Discussions' started by BamaStangGuy, Feb 3, 2015.

  1. BamaStangGuy

    BamaStangGuy Well-Known Member

    I have a template I want to manipulate in someways. Lets call it template_one. How can I grab the contents of that template and put it into a variable?
  2. BamaStangGuy

    BamaStangGuy Well-Known Member

    I am not sure my question was worded right or even what I need.

    What I am trying to do is send the contents of a template, after all the code has been parsed within the template, through an api and then hold the result in a variable that I will then send on to be passed on into another template.

    This is to make it so that the end user can easily edit the template to fit their needs and then have it processed by the api and get the results on a page.

    Thoughts on this? Am I looking at it the wrong way?
  3. nrep

    nrep Well-Known Member

    Did you figure out how to do this, I'm trying to do the same thing at the moment :).
  4. BamaStangGuy

    BamaStangGuy Well-Known Member

    No, I ended up creating a helper to achieve what I was going after.
    nrep likes this.
  5. HWS

    HWS Well-Known Member

    You can fetch the content of a template for example with a template modification into a PHP callback.
    nrep likes this.

Share This Page