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

Using version control with Xenforo templates

#1
Hello, first post here. Just bought a xenforo license and using it for a new project. Having mostly used phpbb2, phpbb3 and vb in the past have to say its a revelation :)

Anyhow reason for posting is to ask how people are managing version control with their xen templates. Couple of us working on this site which is requiring some mods to the default templates which we could really do with tracking. Currently accessing the templates using webdav, editing as required and downloading the modified version locally which is then placed under version control with git. It kind of works but the workflow isn't that clean really, sure there must be a better way and am open to suggestions :)
 
#3
It would be really useful to store the templates in the file system so I can version them with Git and edit them using a real editor. Editing them over the web feels like a throwback to 90's cPanel websites.

(no, copying and pasting to and fro is not acceptable)
 

Chris D

XenForo developer
Staff member
#4
You should use WebDAV.

I used to hate it but now it's a godsend.

I use Cyberduck to connect to WebDAV, and when I find the template I want to edit I have configured Cyberduck to open that in my PHP IDE.

I know it doesn't help you with regards to git and version control but its a great mechanism for general template editing.
 

xf_phantom

Well-known member
#5
take a look at XenForo_DataWriter_Template::_writeDevFileOutput
and
XenForo_Model_Template::importTemplatesFromDevelopment

;)

With some small modifications to the code, you can use it for your addons:)
 
Last edited: