Here's a very simple example that illustrates some of Cheetah's basic syntax:

  <html>
    <head><title>$title</title></head>
    <body>
      <table>
        #for $client in $clients
        <tr>
          <td>$client.surname, $client.firstname</td>
          <td><a href="mailto:$client.email">$client.email</a></td>
        </tr>
        #end for
      </table>
    </body>
  </html>

Compare this with PSP:

  <html>
    <head><title><%=title%></title></head>
    <body>
      <table>
        <% for client in clients: %>
        <tr>
          <td><%=client['surname']%>, <%=client'[firstname']%></td>
	  <td><a href="mailto:<%=client['email']%>">
           <%=client['email']%></a></td>
        </tr>
        <%end%>
      </table>
    </body>
  </html>

See the documentation for more examples.

Cheetah was created by Tavis Rudd, with contributions from many open source volunteers.
R. Tyler Croy is the current maintainer.
SourceForge.net Logo