Jump to content

Structure of template files


Robert Zelník
 Share

Recommended Posts

Currently the template files are basically divided in three parts:

  • head.inc
  • the current content template
  • foot.inc

Are there any reasons to do it that way?

I would like to suggest a well-established way of templating, where the whole page layout is in one file (head and foot together) and this layout template can include sub-templates for particular blocks of content, including the current content template. This way would better support an appropriate level of granularity: easier layouts/templates could be included in one or two files and more complex layouts/templates could be splitted to as many parts as needed. What do you think?

Link to comment
Share on other sites

You're completely free to do it the way you want. Check this post where people discuss other ways of organizing templates and where Ryan explains why this is the chosen form for the default install http://processwire.com/talk/topic/740-a-different-way-of-using-templates-delegate-approach/page__fromsearch__1

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...