1 {config_load file="test.conf" section="setup"}
2 {include file="header.tpl" title=foo}
6 {* bold and title are read from the config file *}
8 {* capitalize the first letters of each word of the title *}
9 Title: {#title#|capitalize}
12 The current date and time is {$smarty.now|date_format:"%Y-%m-%d %H:%M:%S"}
14 The value of global assigned variable $SCRIPT_NAME is {$SCRIPT_NAME}
16 Example of accessing server environment variable SERVER_NAME: {$smarty.server.SERVER_NAME}
18 The value of {ldelim}$Name{rdelim} is <b>{$Name}</b>
20 variable modifier example of {ldelim}$Name|upper{rdelim}
25 An example of a section loop:
29 {if $smarty.section.outer.index is odd by 2}
30 {$smarty.section.outer.rownum} . {$FirstName[outer]} {$LastName[outer]}
32 {$smarty.section.outer.rownum} * {$FirstName[outer]} {$LastName[outer]}
38 An example of section looped key values:
40 {section name=sec1 loop=$contacts}
41 phone: {$contacts[sec1].phone}
44 fax: {$contacts[sec1].fax}
47 cell: {$contacts[sec1].cell}
57 <A HREF="{$SCRIPT_NAME}">
58 <font color="red">This is a test </font>
67 This is an example of the html_select_date function:
70 {html_select_date start_year=1998 end_year=2010}
73 This is an example of the html_select_time function:
76 {html_select_time use_24_hours=false}
79 This is an example of the html_options function:
83 {html_options values=$option_values selected=$option_selected output=$option_output}
87 {include file="footer.tpl"}