X-Git-Url: http://git.harvie.cz/?a=blobdiff_plain;f=wwwroot%2Fsmarty%2Fdemo%2Ftemplates%2Findex.tpl;fp=wwwroot%2Fsmarty%2Fdemo%2Ftemplates%2Findex.tpl;h=c4d5eeeb7aa05ccd89adc14ce2ca9033db81abde;hb=e034221efbc7970ec58be22d7517fd3c503dc903;hp=0000000000000000000000000000000000000000;hpb=c6f21b69e8210bdd0e80cf87f1c2f06dfc848a75;p=mirrors%2FKyberia-bloodline.git diff --git a/wwwroot/smarty/demo/templates/index.tpl b/wwwroot/smarty/demo/templates/index.tpl new file mode 100644 index 0000000..c4d5eee --- /dev/null +++ b/wwwroot/smarty/demo/templates/index.tpl @@ -0,0 +1,83 @@ +{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"}
+
+Tooltip example: Move your mouse over the Help link to see an example of a tooltip using Smarty's popup function.
+
+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 %outer.index% is odd by 2}
+	{%outer.rownum%} . {$FirstName[outer]} {$LastName[outer]}
+{else}
+	{%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"}