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

XF 1.5 Replacing Template

Discussion in 'Styling and Customization Questions' started by Cylent1, Jan 17, 2016.

  1. Cylent1

    Cylent1 Active Member

    How does one go about replacing an entire template through a option call?

    For example: I need to call on a template (Custom header template), to replace the original template (Header Template).
    Last edited: Jan 17, 2016
  2. Arty

    Arty Well-Known Member

    There are 3 ways to do that:

    1. You can use template_create event to load different template.

    2. You can use template_post_render event to replace contents, but this is a bad idea because old template would be rendered before its replaced, which would waste resources.

    3. You can use template modification to replace entire contents with regex. In replace field put new content, in search field put this:

Share This Page