Terminal Icon

Table

» Stamp, alternative PHP Templates

This is a Painter plugin for Stamp. Usage:

 

echo Stamp_Painters_Table::paintTableFromArray(array(
    array( 
'Pizza','Price' ),
    array( 
'Margaretha','7.00'),
    array( 
'Funghi','8.00'),
    array( 
'Venezia','9.00')
))->
wash();

echo 
Stamp_Painters_Table::paintTableWithHeaders(array(
    array( 
'Margaretha','7.00'),
    array( 
'Funghi','8.00'),
    array( 
'Venezia','9.00')
),array( 
'Pizza','Price' ))->wash();




Template Details

 
<table>
<!-- 
cut:header -->
<
thead>
    <!-- 
cut:headrow -->
    <
tr>
        <!-- 
cut:head -->
        <
th>#head#</th>
        
<!-- /cut:head -->
    </
tr>
    <!-- /
cut:headrow -->
    <!-- 
paste:headrows -->
</
thead>
<!-- /
cut:header -->
<!-- 
paste:columns -->
<
tbody>
    <!-- 
cut:row -->
    <
tr>
        <!-- 
cut:cell -->
        <
td>#cell#</td>
        
<!-- /cut:cell -->
        <!-- 
paste:cells(cell,head) -->
    </
tr>
    <!-- /
cut:row -->
<!-- 
paste:rows(row) -->
</
tbody>
</
table>
    

Cut Points

headerA table header
header headrowOne row for a table header
header headrow headA cell for a row in table header
rowA normal row for table body
row cellA cell in the row for a table body

Glue Points

header headrowsA place in the header to put header rows
columnsA place to put the table head
rowsA place to put table rows
row cellsA place in the row to put cells

Slots

headrow headA place to put the column name (in headrow)
row cell cellCell slot

Manual Pages

  • Philosophy
  • Welcome
  • Basics
  • Download
  • Painter Plugins
  • Navigation
  •  



    copyright © 2011 Gabor de Mooij | Stamp PHP Template Library