{config_load file="test.conf" section="setup"} {include file="header.tpl" title=foo}

{* bold and title are read from the config file *}
    {if #bold#}{/if}
        {* capitalize the first letters of each word of the title *}
        Title: {#title#|capitalize}
        {if #bold#}{/if}

    The current date and time is {$smarty.now|date_format:"%Y-%m-%d %H:%M:%S"}

    The value of global assigned variable $SCRIPT_NAME is {$SCRIPT_NAME}

    Example of accessing server environment variable SERVER_NAME: {$smarty.server.SERVER_NAME}

    The value of {ldelim}$Name{rdelim} is {$Name}

variable modifier example of {ldelim}$Name|upper{rdelim}

{$Name|upper}


An example of a section loop:

    {section name=outer
    loop=$FirstName}
        {if $smarty.section.outer.index is odd by 2}
            {$smarty.section.outer.rownum} . {$FirstName[outer]} {$LastName[outer]}
        {else}
            {$smarty.section.outer.rownum} * {$FirstName[outer]} {$LastName[outer]}
        {/if}
        {sectionelse}
        none
    {/section}

    An example of section looped key values:

    {section name=sec1 loop=$contacts}
        phone: {$contacts[sec1].phone}
        
fax: {$contacts[sec1].fax}
cell: {$contacts[sec1].cell}
{/section}

testing strip tags {strip}
This is a test
{/strip}

This is an example of the html_select_date function:
{html_select_date start_year=1998 end_year=2010}
This is an example of the html_select_time function:
{html_select_time use_24_hours=false}
This is an example of the html_options function:
{include file="footer.tpl"} {capture name='_smarty_debug' assign=debug_output} Smarty Debug Console

Smarty {Smarty::SMARTY_VERSION} Debug Console - {if isset($template_name)}{$template_name|debug_print_var nofilter} {/if}{if !empty($template_data)}Total Time {$execution_time|string_format:"%.5f"}{/if}

{if !empty($template_data)}

included templates & config files (load time in seconds)

{foreach $template_data as $template} {$template.name}
   (compile {$template['compile_time']|string_format:"%.5f"}) (render {$template['render_time']|string_format:"%.5f"}) (cache {$template['cache_time']|string_format:"%.5f"})
{/foreach}
{/if}

assigned template variables

{foreach $assigned_vars as $vars} {/foreach}

${$vars@key}

{if isset($vars['nocache'])}Nocache
{/if} {if isset($vars['scope'])}Origin: {$vars['scope']|debug_print_var nofilter}{/if}

Value

{$vars['value']|debug_print_var:10:80 nofilter}
{if isset($vars['attributes'])}

Attributes

{$vars['attributes']|debug_print_var nofilter} {/if}

assigned config file variables

{foreach $config_vars as $vars} {/foreach}

#{$vars@key}#

{if isset($vars['scope'])}Origin: {$vars['scope']|debug_print_var nofilter}{/if}
{$vars['value']|debug_print_var:10:80 nofilter}
{/capture}