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

createTemplateObject error

Discussion in 'XenForo Development Discussions' started by Mythotical, Nov 6, 2010.

  1. Mythotical

    Mythotical Well-Known Member

    I may have figured out a problem to my template display but I can't find where $this is defined so I can properly update the code to reflect:
    PHP:
    XenForo_XXXXX::createTemplateObject
    Here is the error:
    The line with the code using $this:
    PHP:
    $xplft['temp_template'] = $this->createTemplateObject($xplft['temp_template'], $xplft);
    Any help much appreciated.
     
  2. Indigo

    Indigo Active Member

    createTemplateObject() is a method in XenForo_View. I believe it's like that to nudge you into keeping all template-related code inside the view layer. :)

    So, you would want to include that code inside of a custom view class.
     
  3. Mythotical

    Mythotical Well-Known Member

    Ahhhh gotcha

    This Blocks stuff is killing me on getting my template variable to work properly.
     
  4. Mythotical

    Mythotical Well-Known Member

    I finally got something figured out, I used XenPorta as an example, figured out how to use createTemplateObject.
     
  5. Jaxel

    Jaxel Well-Known Member

    What? FOR SHAME!

    I'm a programming noob... you shouldn't ever look to what I do to learn how to program...
     
    Jeremy likes this.
  6. Jeremy

    Jeremy XenForo Moderator Staff Member

    Jaxel, there is no way you are a programming noob! For you to create XenPorta and XenCarta, that's amazing.
     
  7. Mythotical

    Mythotical Well-Known Member

    LOL Actually I love the stuff you do but you figured it out before me and thanks to you I know one more thing for XenForo.

    LOL I need to get XenCarta and play with it.
     
  8. Jeremy

    Jeremy XenForo Moderator Staff Member

    I haven't actually played with either, but we bashed coding ideas / found solutions together a while ago. So I know its amazing. I haven't installed any add-ons besides my own. And only one has gone "full-throttle" in the past 2 days, nearly ready for release.
     
  9. Mythotical

    Mythotical Well-Known Member

    Oh nice. Can't wait to see the one that is nearly ready.
     
  10. Jeremy

    Jeremy XenForo Moderator Staff Member

    Yep just some validation and XenForo will have a complete Custom BB Code Manager. However, there is one fallback, but I think the trade off is ok for a v1.1 release.
     
  11. Mythotical

    Mythotical Well-Known Member

    Oh cool, I can't wait. I've been waiting for you to finish that so I can use it.
     
  12. Jaxel

    Jaxel Well-Known Member

  13. Mythotical

    Mythotical Well-Known Member

    I hear ya, I am wanting that same thing too. It would help in my site setup.
     

Share This Page