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

_replace_ templates?


Well-known member
is it possible to release template modifications as addons?
ideally, i would like to simply replace an existing template with new template code. it seems it would be pretty simple and straightforward, but i have yet to find an example of somebody doing something like this.


Well-known member
I do it in my XenPorta modification... However, I do not replace any base templates, only existing XenPorta block templates. I do not recommend doing what you are trying to do, because in order to do this, you pretty much have to update the MASTER template... which is something you should never do, because you are essentially releasing a mod that changes core functionality of XenForo at that point.

        $className = 'EWRporta_Block_'.$file->module_name;
        $dw3 = XenForo_DataWriter::create('XenForo_DataWriter_Template');
        if ($template = $this->getModelFromCache('XenForo_Model_Template')->getTemplateInStyleByTitle($className))
            'title' => $className,
            'template' => $file->module_template,
            'style_id' => '0',


Well-known member
yeah, the master style isnt something i would want to alter. users being unable to revert their template could turn into a nightmare.
thanks for the infos jaxel

xf need a way to share template mods other than 'styles'.