How do PHP people handle templating simply?
Edit: Perhaps I worded my question wrong. How do PHP programmers try and keep to DRY (ala layouts and view templates)?
Edit: Perhaps I worded my question wrong. How do PHP programmers try and keep to DRY (ala layouts and view templates)?
EDIT: Disclaimer: I'm a PHP guy trying to make a break for it, and the question was both rethorical and tongue-in-cheek.
template = """<boilerplate html>%(greeting)s</boilerplate html>"""
parts = {'greeting': "Hello, World!"}
page = template % parts
I create my site-wide template in a module and never have to look at it again, so my application code is mostly logic. When I have to work on PHP or Coldfusion, I don't understand how people can bear to have the logic hidden in a markup language that's mixed up with another markup language. Many can't, and that's why there are templating engines for what are essentially template-based languages.