XF 1.0 Editing Templates and Defining a Callback for Pages

When we debuted the Pages feature, it was intended to be a simple way to get some custom HTML onto a page surrounded by the standard XenForo user interface chrome. By the time we reached Beta 1, it had evolved into an altogether more powerful system.

Pages now support a PHP callback, so your pages can request data from the database and be used as a platform for building any kind of single-page application you might want to build. They also allow you to override the default and specify your own template to be rendered by the page, so the possibilities really are limitless.

This two-part video shows you the basics of building a simple application using the Pages system, and delves into the realms of the template editor to create and edit the custom HTML that will be used to display your page.

Having built a basic dynamic page, in this second part we add more functionality and data to the page including a sidebar and a list of the authors of the most recent posts. In doing so, we look into advanced template syntax use, and reveal one of XenForo's hidden treasures.

Part 3
I've just uploaded a third part, answering some questions that have come up:

... and created a new answer post here:


in memoriam 1991-2020
All the really juicy bits are in the second video :)

I've noticed and all I got to say is... You and Mike are my hero! I literally just got super excited because Panic's Coda supports WebDAV which means I can use it. And I think they are including or attempting to include custom auto-complete definitions so I could in theory add all of XenForo's stuff into it and i'll be in heaven. haha. That has to be by far the coolest feature I have seen yet!

Jake Bunce

Well-known member



Random Question:

Could you somehow set this up on you're own set up where this connects to an SVN repository (I know its not easy to do with more than templates...) so you can utilize this to track changes?
This would be great.

It is/was always a big problem, when you were working in an team when data are saved in the database.
There are 2 add-ons for vB, which allow inserting templates from files into the "live develop system", so it is possible to create templates from files (git/svn friendy^^)


This is so sick. Propably the first Websoftware which includes such awesome features. :) Congrats to such a well developed software.