diff options
author | mrjive <mrjive@mrjive.it> | 2015-01-06 15:13:03 +0100 |
---|---|---|
committer | mrjive <mrjive@mrjive.it> | 2015-01-06 15:13:03 +0100 |
commit | b80c218606994032e76805900cb9b340ea132358 (patch) | |
tree | bf625cf4c59bf521e639018399bf1770d116a6a0 /library/Smarty/demo/templates/index.tpl | |
parent | aa6d61d3b19cb13c30bf5a1579adefedf0cc9515 (diff) | |
parent | 3185bfe3ca131d471b8fcdc0c94abf1a114486c7 (diff) | |
download | volse-hubzilla-b80c218606994032e76805900cb9b340ea132358.tar.gz volse-hubzilla-b80c218606994032e76805900cb9b340ea132358.tar.bz2 volse-hubzilla-b80c218606994032e76805900cb9b340ea132358.zip |
Merge pull request #1 from friendica/master
test pull request
Diffstat (limited to 'library/Smarty/demo/templates/index.tpl')
-rw-r--r-- | library/Smarty/demo/templates/index.tpl | 91 |
1 files changed, 48 insertions, 43 deletions
diff --git a/library/Smarty/demo/templates/index.tpl b/library/Smarty/demo/templates/index.tpl index 38d233412..1fbb6d379 100644 --- a/library/Smarty/demo/templates/index.tpl +++ b/library/Smarty/demo/templates/index.tpl @@ -4,18 +4,18 @@ <PRE> {* bold and title are read from the config file *} -{if #bold#}<b>{/if} -{* capitalize the first letters of each word of the title *} -Title: {#title#|capitalize} -{if #bold#}</b>{/if} + {if #bold#}<b>{/if} + {* capitalize the first letters of each word of the title *} + Title: {#title#|capitalize} + {if #bold#}</b>{/if} -The current date and time is {$smarty.now|date_format:"%Y-%m-%d %H:%M:%S"} + 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} + The value of global assigned variable $SCRIPT_NAME is {$SCRIPT_NAME} -Example of accessing server environment variable SERVER_NAME: {$smarty.server.SERVER_NAME} + Example of accessing server environment variable SERVER_NAME: {$smarty.server.SERVER_NAME} -The value of {ldelim}$Name{rdelim} is <b>{$Name}</b> + The value of {ldelim}$Name{rdelim} is <b>{$Name}</b> variable modifier example of {ldelim}$Name|upper{rdelim} @@ -24,59 +24,64 @@ variable modifier example of {ldelim}$Name|upper{rdelim} 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}<br> - fax: {$contacts[sec1].fax}<br> - cell: {$contacts[sec1].cell}<br> -{/section} -<p> - -testing strip tags -{strip} + {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} + <br> + + fax: {$contacts[sec1].fax} + <br> + + cell: {$contacts[sec1].cell} + <br> + {/section} + <p> + + testing strip tags + {strip} <table border=0> - <tr> - <td> - <A HREF="{$SCRIPT_NAME}"> - <font color="red">This is a test </font> - </A> - </td> - </tr> + <tr> + <td> + <A HREF="{$SCRIPT_NAME}"> + <font color="red">This is a test </font> + </A> + </td> + </tr> </table> -{/strip} + {/strip} </PRE> This is an example of the html_select_date function: <form> -{html_select_date start_year=1998 end_year=2010} + {html_select_date start_year=1998 end_year=2010} </form> This is an example of the html_select_time function: <form> -{html_select_time use_24_hours=false} + {html_select_time use_24_hours=false} </form> This is an example of the html_options function: <form> -<select name=states> -{html_options values=$option_values selected=$option_selected output=$option_output} -</select> + <select name=states> + {html_options values=$option_values selected=$option_selected output=$option_output} + </select> </form> {include file="footer.tpl"} |