Results 1 to 2 of 2

Thread: templating / dynamically create pages

  1. #1
    Join Date
    Jan 2008
    Posts
    441
    Thanks
    67
    Thanked 4 Times in 4 Posts

    Default templating / dynamically create pages

    can anyone point to a direction for me to learn how to make a template from multiple html pages?

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    You can use a CMS system to do this automatically.
    Beyond that, you can do this yourself by using a number of strategies. You should get familiar with includes and basic operations in PHP like ifs and variables.
    Basically you need to strip out all the content and place the design into a page with "blanks" (probably variables, or maybe includes) for content.
    You can, if you'd like, also use a database for this.

    There are so many ways to do this, it really does depend on the project. If you aren't sure where to start and you just want to learn the methods, then just start anywhere and see what works best. If you have a specific project and goal in mind, post about that and we can point you in a more specific direction.

    Also, I expect there are many "php templating tutorials" on google

    And a last bit of general advice: when trying to do dynamic content like this, you need to make it as organized as possible, or there will be many problems with getting it to run smoothly and just for writing the code (even if it ends up working). For example, use CSS as much as possible and make sure all of your tabs line up correctly. This may seem obvious or unimportant, but it really will matter once you are trying to dynamically generate html-- the less mess you start with, the less you'll end up with. If you want to end up with clean html output (once generated, by "view->source"), then that may be the hardest part of this.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •