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

XF 1.0 Editing Templates and Defining a Callback for Pages

Discussion in 'Have You Seen...?' started by Kier, Oct 27, 2010.

  1. Kier

    Kier XenForo Developer Staff Member

    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:
  2. RickM

    RickM Well-Known Member

    Ahh I was wondering why dav was built in :D

    Thats a pretty slick templating system you've built there guys!
  3. Brogan

    Brogan XenForo Moderator Staff Member

    Editing templates directly using standalone text editors is a superb feature.
    MaRZoCHi likes this.
  4. Jeremy

    Jeremy Well-Known Member

    The first video was very informative. Once I get time to watch the second, no doubt I will!
  5. g0rn

    g0rn Well-Known Member

    By the way, what does the asterisk sign right after the user title mean?
  6. Peggy

    Peggy Well-Known Member

    That you're a license-holder.
    Diablotic and g0rn like this.
  7. Kier

    Kier XenForo Developer Staff Member

    All the really juicy bits are in the second video :)
    CaptainMorgan and Jeremy like this.
  8. Jeremy

    Jeremy Well-Known Member

    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!
  9. Quillz

    Quillz Well-Known Member

    Looks good.
  10. Pope Viper

    Pope Viper Well-Known Member

  11. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member


  12. Andy Huang

    Andy Huang Well-Known Member

    Nice! I think I just got an easy way to make my project easier... Will need to probe this further to see for sure :)
  13. Jeremy

    Jeremy 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?
  14. Kier

    Kier XenForo Developer Staff Member

    That sounds like a pretty complex undertaking to me.
  15. nice one dude looks great
  16. ragtek

    ragtek Guest

    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^^)
  17. Adan0s

    Adan0s Member

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

    Jeremy Well-Known Member

    That's a depressing post... but do you think it'd be possible? I'm not all to familiar with WebDAV...
  19. Andy.N

    Andy.N Well-Known Member

    Can Page be used as wiki system where permission is granted to all registered member to edit the content?
  20. Brogan

    Brogan XenForo Moderator Staff Member

    It is currently not possible to edit a Page outside the ACP.

Share This Page