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

How to register variables custom template with specific conditions

Discussion in 'XenForo Development Discussions' started by EgyKit, Apr 23, 2012.

  1. EgyKit

    EgyKit Member

    Please I need help creating custom template and register it's variables according to special conditions, e.g in threads I want to get thread owner custom fields and use it in that template and at the same time add this template to page_container_breadcrumb_top hook.

    And in every page on the forum I want to get default values and register them to that custom template.

    This was very easy to do with vBulletin as there was hooks that allow me to add my code and register custom templates every where.

    Any example please for that?
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    The xen:include syntax that allows you to inline templates also allows you to set variables to pass to the included template. This template is a good example:

    Admin CP -> Appearance -> Templates -> post

    The entire post template is one big xen:include of the message template.
    EgyKit likes this.
  3. EgyKit

    EgyKit Member

    Thank you, I will look for that template and it's related variables to understand.

Share This Page