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

Calling included templates

Discussion in 'XenForo Development Discussions' started by Farjad, Jul 16, 2011.

  1. Farjad

    Farjad Member

    How would one go about modifying templates that are called using <xen:include ...>

    I tried the code events: create template & post render... and they both do not see those included templates being called.

    Any help would be appreciated.
     
  2. Lawrence

    Lawrence Well-Known Member

    Which template do you want to modify? Does it contain a hook?
     
  3. Farjad

    Farjad Member

    There's no hook in the template but it's: attached_file ... what I basically want to do is display certain extensions differently, but I want to do it without editing the template... if there was a hook, it would've been easier (or if it was called in a template code event, unless I missed something)
     
  4. charlietfl

    charlietfl Member

    I've been successful adding my own hooks in a few places and adding them to a template hook listener

    hook name="myHookName"
     
  5. Farjad

    Farjad Member

    I'd rather prefer to avoid editing templates.
     
  6. charlietfl

    charlietfl Member

    I'm new to using this system, and a bit leary about template edits also , so another thing I've been trying is going back to the nearest existing hook, creating my own template within the hook and assigning it to my own add-on. This way I can replace template sections leaving the default template intact.
     
  7. Farjad

    Farjad Member

    Yes. But there are no hooks in attached_files. I could've used a dirty hack to html replace it on template create but template create does not show the template being created.
     
  8. samtheman

    samtheman New Member

    This is my question too. Any ideas on the cleanest way to modify a template called by xen:include
     

Share This Page