Optimalworks Ltd web design, SEO, training and consultancy 

the site completely surpassed my expectations GT, AutoDirector, we build websites that work, my website is great - I love it MP, XL Autos, reach more customers, make more sales, it's more than I ever could have expected LM, Trade Cars UK, we can help your business grow, 99% of business now comes from my website GV, Bash Events, promoting standards throughout the web industry, your contribution added a level of quality we would otherwise have struggled to achieve PS, Hemsley Fraser
  1. home
  2. Services
  3. Portfolio
  4. Contact us
  5. blog

TACS v1.3.1 update – free PHP template system

written by craig, 1 August 2010

TACS is our free web site Templating and Caching System for PHP. It’s not a replacement for Smarty, but it’s far simpler and can be used by any developer within minutes.

TACS allows PHP code to be run either:

  1. At render time when the page is cached. Typically, a menu could be generated once so all subsequent visits return static HTML.
  2. At runtime when the user accesses the page, e.g. for a form submission.

The cached page therefore contains the minimum of PHP code. It allows you to use PHP as-is rather than forcing you to learn another API or syntax.

What’s more, TACS is free. Use it, abuse it, copy it, or do whatever you like with the code. We don’t mind — but a link to this website or PayPal donations are gratefully received!

TACS v1.3.1 fixes a path resolution bug and allows you to use permalink-like URLs.

Download TACS (12 Kb)

  • categories: free download
  • tags: download, php, software
  • trackback: http://www.optimalworks.net/blog/2010/software/free-download/tacs-v131-released/trackback
  • bookmark: del.icio.us, digg, facebook, twitter, reddit, Furl, Spurl, Blinklist, Slashdot, Technorati, Yahoo!

3 comments:

  1. 8 February 2011 Phil commented

    How can I add an array of data to be passed to the template? Something like a select pulldown that is populated from a DB?

    Pretty cool little template system, just wondering if it could replace something like Smarty…

  2. 8 February 2011 craig commented

    Hi Phil. You use standard PHP code in TACS, rather than Smarty-like tags. Any code between [[ and ]] brackets is rendered when the page is cached. You can define an array and output it, but it’ll only occur once rather than every time the page is loaded, e.g.

    [[< ?php
    // generate menu once
    $menu = array('home', 'contact');
    for (m$ = 0; $m < count($menu); $m++)
    echo $menu[$m];
    ?>]]

    Smarty is a more comprehensive templating system which does far more. TACS is ideal if you don’t require that complexity.

  3. 25 March 2011 Web Deisgn Surrey commented

    Thanks for the update!!

add your comments
please enter your name
please enter your email address - it will not be published anywhere
please enter your website address
please enter your comments (all are moderated and checked for spam)

  • next article: High Performance JavaScript book review 
  • previous article: PHP The Good Parts book review 
search
  • all popular (5)
  • courses (1)
  • general (4)
  • hardware (1)
  • software (31)
    • blogs (1)
    • free download (8)
    • web browsers (12)
    • web servers (2)
  • web development (42)
    • accessibility (4)
    • ajax (1)
    • css (3)
    • graphic design (4)
    • html (1)
    • javascript (11)
    • php (5)
    • seo (2)

tags

  • accessibility
  • ajax
  • analytics
  • apache
  • award
  • book
  • chrome
  • computing
  • css
  • design
  • developers
  • dom
  • download
  • editor
  • emulation
  • firefox
  • funny
  • google
  • graphics
  • hardware
  • html
  • ie
  • javascript
  • opera
  • php
  • png
  • portfolio
  • review
  • ruby
  • safari
  • security
  • seo
  • server
  • software
  • spam
  • ssl
  • standards
  • wordpress
  • xml
  1. site map
  2. home
  3. Services
  4. Portfolio
  5. Contact us
  6. blog
  7. RSS feed
  8. project survey

XHTML 1.0 | CSS 2.1 | WAI AAA | printer-friendly

©2012 Optimalworks Ltd, Devon, UK. Registered in England and Wales No. 5922205.

This page can be viewed at http://www.optimalworks.net/blog/2010/software/free-download/tacs-v131-released