PHP Classes

File: alternative.tpl

Recommend this page to a friend!
  Classes of Evgeny  >  tplTemplatez  >  alternative.tpl  >  Download  
File: alternative.tpl
Role: Example script
Content type: text/plain
Description: example
Class: tplTemplatez
Template class used to separate PHP and HTML
Author: By
Last change:
Date: 18 years ago
Size: 869 bytes
 

Contents

Class file image Download
<html>
<head>
    <title>Alternative block</title>
</head>

<body>
<b>Example with alternative blocks, very flexible.<br>
Hope, not too complicated.</b>
<br><br>

<tmpl:ROW>
   
    <table cellpadding="5" cellspacing="1" width="600">
   
    <tr bgcolor="#cc9900">
        <td width="250">Itteration # {var}</td>
        <td>This tr doesn't belong to any block.<br>Will be printed always.</td>
    </tr>
   
    <tmpl:if_i_2>
    <tr bgcolor="#C0C0C0">
        <td colspan="2">Will be printed when $i = 2 or 5 </td>
    </tr>
    </tmpl:if_i_2>
   
    <tmpl:another_tr>
    <tr bgcolor="#99ccff">
       
        <tmpl:two_td>
        <td>Will be printed when $i = 4</td>
        <td>Will be printed when $i = 4</td>
        </tmpl:two_td>

        <tmpl:one_td>
        <td colspan="2">Will be printed when $i = 3 or 5</td>
        </tmpl:one_td>
   
    </tr>
    </tmpl:another_tr>
   
    </table><br>
   
</tmpl:ROW>

</body>
</html>

For more information send a message to info at phpclasses dot org.