Chapter 8. Custom Functions

Table of Contents

assign
counter
cycle
debug
eval
fetch
html_checkboxes
html_image
html_options
html_radios
html_select_date
html_select_time
html_table
math
mailto
popup_init
popup
textformat

Smarty è fornito di numerose funzioni utente che potete utilizzare nei template.

assign

Nome Attributo Tipo Obbligatorio Default Descrizione
var stringa nessuno Nome della variabile valorizzata
value stringa nessuno Valore assegnato alla variabile

assign è usato per assegnare valori alle variabili del template durante l'esecuzione dello stesso.

Example 8.1. assign

{assign var="name" value="Bob"}

The value of $name is {$name}.

OUTPUT:

The value of $name is Bob.