68 Classifieds API

Features
class tree: Smarty | index: Smarty | all elements

File/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:

  1.  PHP$data array(
  2.         array('name'=>'Marc''city'=>'Miami'),
  3.         array('name'=>'Someone''city'=>'Somewhere')
  4.       );
  5.  TPL{html_table_adv loop=$data}Hello [[name]]you're from [[city]].{/html_table_adv}
  6.  Output: a table with two cells modified with each person's name and city as seen in the TPL
  7.  code

string smarty_block_html_table_adv (array $params, Smarty $content,  &$smarty)
  • array $params
  • Smarty $content
  • &$smarty
smarty_function_html_table_cycle2 (line 140)
void smarty_function_html_table_cycle2 ( $name,  $var,  $no)
  • $name
  • $var
  • $no