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

Can I create my own template hooks?

Discussion in 'XenForo Questions and Support' started by Mr. Goodie2Shoes, Apr 14, 2012.

  1. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

    well... the title says it all... can I create my own custom hooks?
     
  2. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

    okay... got my answer... I can do that... awesome! :D
     
  3. Floris

    Floris Guest

    It would be helpful for others if you link to the answer =D
     
  4. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

    well... just add
    Code:
    <xen:hook name="[a unique name]" />
    to any place you want! :D
     
  5. Ingenious

    Ingenious Well-Known Member

    Yes it's a great system. I use this now when I want to do some custom stuff in a template (like a banner rotator). Rather than keep track of complex template edits I only have to remember what custom hook went where.
     
  6. Sadik B

    Sadik B Well-Known Member

    Yes you can (as you have obviously found out). The only issue with that is that you will have to make at least one template edit to add the hook. Thankfully there's the brilliant TMS addon to the rescue! ;)
     
    Rob Fritz, ragtek and Deebs like this.

Share This Page