Made sections work mostly.

This commit is contained in:
andrey
2000-11-20 03:20:55 +00:00
parent 9b7b565df0
commit d87d1c0176
6 changed files with 156 additions and 50 deletions

View File

@@ -10,7 +10,7 @@ $smarty->assign("LastName",array("Doe","Smith","Johnson","Case"));
$smarty->assign("Class",array(array("A","B","C","D"), array("E", "F", "G", "H"),
array("I", "J", "K", "L"), array("M", "N", "O", "P")));
$smarty->spew("./templates/index.tpl");
$smarty->quip("./templates/index.tpl");
print "\ndone\n";

View File

@@ -1,11 +1,12 @@
{include header.tpl}
{* A simple variable test *}
hello, my name is {$Name}.<br>
{if $Name eq "Joe"}
I am {ldelim}Joe{rdelim}.<br>
{else}
I am not Joe.<br>
{/if}
{include footer.tpl}
My interests are:
{section name=outer loop=$FirstName}
{if %outer.index% is even by 2}
. {$outer/FirstName} {$outer/LastName}
{else}
* {$outer/FirstName} {$outer/LastName}
{/if}
{sectionelse}
none
{/section}