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

Funktionen

Jedes Smarty-Tag gibt entweder eine Variable aus oder ruft eine Funktion auf. Funktionen werden aufgerufen indem der Funktionsname und die Parameter mit Trennzeichen umschlossen werden. Beispiel: {funcname attr1="val" attr2="val"}.

Example 3.3. Funktions-Syntax


{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"}

  

Sowohl der Aufruf von eingebauten, als auch der von eigenen Funktionen folgt der gleichen Syntax.

Eingebaute Funktionen erlauben einige Basis-Operationen wie if, section und strip. Diese Funktionen können nicht verändert werden.

Individuelle Funktionen die die Fähigkeiten von Smarty erweitern werden als Plugins implementiert. Diese Funktionen können von Ihnen angepasst werden, oder Sie können selbst neue Plugins hinzufügen. {html_options} und {html_select_date} sind Beispiele solcher Funktionen.

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 9 plus 7? (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