class tree: Smarty |
index: Smarty |
all elements
smarty_block_html_table_adv (line 52)
smarty_function_html_table_cycle2 (line 140)
/plugins/block.html_table_adv.php
Description
Smarty plugin
Functions
smarty_block_html_table_adv (line 52)
Smarty {html_table_adv} function plugin
Type: block
Name: html_table_adv
Date: Feb 17, 2003
Purpose: make an html table from an array of arrays of data with instant customized cell layout
Input:
- loop = array to loop through
- cols = number of columns
- rows = number of rows
- table_attr = table attributes
- tr_attr = table row attributes (arrays are cycled)
- td_attr = table cell attributes (arrays are cycled)
- trailpad = value to pad trailing cells with
- vdir = vertical direction (default: "down", means top-to-bottom)
- hdir = horizontal direction (default: "right", means left-to-right)
- inner = inner loop (default "cols": print $loop line by line, $loop will be printed column by column otherwise)
- ldelim = the left delimiter for finding variables in content (default: "[[")
- rdelim = the right delimiter for finding variables in content (default: "]]")
Examples:
- PHP: $data = array(
- array('name'=>'Marc', 'city'=>'Miami'),
- array('name'=>'Someone', 'city'=>'Somewhere')
- );
- TPL: {html_table_adv loop=$data}Hello [[name]], you're from [[city]].{/html_table_adv}
- Output: a table with two cells modified with each person's name and city as seen in the TPL
- code
- array $params
- Smarty $content
- &$smarty
smarty_function_html_table_cycle2 (line 140)
void
smarty_function_html_table_cycle2
( $name, $var, $no)
- $name
- $var
- $no

