Menu

Multiple non-nested templates in a file

Help
2002-09-05
2002-09-28
  • Chris Anderson

    Chris Anderson - 2002-09-05

    I have a site that will use probably 15 templates and I've been going insane trying to get just one template out of the file.

    The format would be like

    <!-- Begin Top -->

    <!-- End Top -->

    <!-- Begin middle-->

    <!-- End middle-->

    <!-- Begin bottom-->

    <!-- End bottom-->

    Is this possible?

     
    • Richard Archer

      Richard Archer - 2002-09-28

      No, template.inc does not support this application. You could probably add your own method to the class to pull out a single block with a PCRE. Or you could do what the rest of us do and put all the individual blocks into their own file.

      I can see there may be performance advantages in having only a single file read from disk and then manipulated internally. But if your site is busy enough for performance to be of concern the files will most likely all be in cache anyway (and you should probably investigate a content caching system).

      ...Richard.

       

Log in to post a comment.