Get Smarty

Smarty Icon

You may use the Smarty logo according to the trademark notice.

Smarty Template Engine Smarty Template Engine

For sponsorship, advertising, news or other inquiries, contact us at:

Check reviews of PHP Web Hosting, compatible with Smarty Templates

Funzioni

Ogni tag di Smarty può stampare una variable o chiamare una qualche funzione. Le funzioni vengono richiamate richiudendo la funzione e i suoi attributi fra i delimitatori, così: {nomefunzione attr1="val" attr2="val"}.

Example 3.2. sintassi delle funzioni


{config_load file="colors.conf"}

{include file="header.tpl"}

{if $highlight_name}
    Welcome, <font color="{#fontColor#}">{$name}!</font>
{else}
    Welcome, {$name}!
{/if}

{include file="footer.tpl"}

  

Sia le funzioni incorporate che le funzioni utente hanno la stessa sintassi nel template. Le funzioni incorporate sono il cuore pulsante di Smarty, ad esempio if, section e strip. Non possono essere modificate. Le funzioni utente sono funzioni addizionali sviluppate attraverso i plugin. Potete modificarle a piacere, e potete crearne di nuove. html_options e html_select_date sono esempi di funzioni utente.

Comments
No comments for this page.
Post a Comment
All comments are moderated. Support questions are ignored, use the forums instead.
Author:
Email: (not shown)
What is 3 plus 14? (Are you human?)

Sponsors [info]

Cheap Website Hosting @hostdone.com
Cheap Hosting @HostsVault
email marketing @ActiveCampaign
broadband deals @BroadbandGenie
Best UK Web Hosting @webhost.uk.net
Reliable UK and US Web Hosting @rshosting.com
Cheap US and UK Web Hosting @infrenion.com
I.T Certification Exams @pass-guaranteed.com
Certification Practice Tests @firsttrycertify.com
Certification Practice Exam Questions @ace-it-certifications.com
Broadband Speed Test @broadbandspeed.co.uk
bulk email software @americaint.com