SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2002
    0 Post(s)
    0 Thread(s)

    Templating a site

    I have created my own basic templating script to create static pages for my site. However, I am trying to "not reinvent the wheel" and use an established Perl module before I advance my script anymore. IF I can find an appropriate one.

    I think I want to use Template Toolkit because it seems kept up and to do what I want... I think.

    Specifically, I think the ttree script is what I want to access... but everything I could find only indicates it being a command line script.

    I have been at this all day... maybe someone can point me in the right direction.

    Here is what I am working toward:

    There is a main content folder which contains all the content files and possibly sub folders with more content files.

    Each content file can have variables defined in it using delimiters. Such as meta_description = text ( kind of like a unique embedded header for each content file ) This allows me to go right to the file and not worry about tracking down data in a data file somewhere.

    There is a folder for template files. I prefer the main template to be complete from HTML start tag to end tag and insert the content file into it. As opposed to the way Template Toolkit seems to slap headers and footers into the content file.

    The build script will take all files in the content folder (including sub-folders), merge the appropriate ones (non image, css, etc) into the called template, and write the files to the destination folder. The images, css, etc should be copied over unedited. The files should only be created or written over if the content source file has been modified since the last run of the build script.

    Hope someone can help me.


  2. #2
    SitePoint Wizard bronze trophy KevinR's Avatar
    Join Date
    Nov 2004
    Moon Base Alpha
    0 Post(s)
    0 Thread(s)
    If you're just creating static pages do it however you want. The template modules are for dynamic pages. Sounds like all you really need to do is check the date of the files to decide if the pages need to be rebuilt.


Posting Permissions

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