mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 19:04:27 +02:00
update quickstart text
This commit is contained in:
22
QUICKSTART
22
QUICKSTART
@@ -143,17 +143,10 @@ require("Smarty.class.php");
|
|||||||
$smarty = new Smarty;
|
$smarty = new Smarty;
|
||||||
$smarty->assign("Name","Ned");
|
$smarty->assign("Name","Ned");
|
||||||
$smarty->assign(array(
|
$smarty->assign(array(
|
||||||
<<<<<<< QUICKSTART
|
|
||||||
"FirstName" => "Fred",
|
|
||||||
"LastName" => "Flanders",
|
|
||||||
"Address" => "Springfield"
|
|
||||||
));
|
|
||||||
=======
|
|
||||||
"FirstName" => "Ned",
|
"FirstName" => "Ned",
|
||||||
"LastName" => "Flanders",
|
"LastName" => "Flanders",
|
||||||
"Address" => "Springfield"
|
"Address" => "Springfield"
|
||||||
));
|
));
|
||||||
>>>>>>> 1.2
|
|
||||||
$zipcode = "55555";
|
$zipcode = "55555";
|
||||||
$smarty->assign("Zipcode",$zipcode);
|
$smarty->assign("Zipcode",$zipcode);
|
||||||
$smarty->display("./templates/index.tpl");
|
$smarty->display("./templates/index.tpl");
|
||||||
@@ -194,18 +187,6 @@ Example:
|
|||||||
|
|
||||||
--------- templates/index.tpl --------
|
--------- templates/index.tpl --------
|
||||||
{include file="header.tpl" title="Home Page"}
|
{include file="header.tpl" title="Home Page"}
|
||||||
<<<<<<< QUICKSTART
|
|
||||||
{if $Name eq ""}
|
|
||||||
Hello, Noname!<br>
|
|
||||||
{elseif $Name eq "Fred"}
|
|
||||||
Hello, Frederick!<br>
|
|
||||||
{else}
|
|
||||||
Hello, {$Name}<br>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
{$FirstName}, {$LastName}<br>
|
|
||||||
{$Address}, {$Zipcode}
|
|
||||||
=======
|
|
||||||
{if $Name eq ""}
|
{if $Name eq ""}
|
||||||
Hello, Noname!<br>
|
Hello, Noname!<br>
|
||||||
{elseif $Name eq "Ned"}
|
{elseif $Name eq "Ned"}
|
||||||
@@ -216,7 +197,6 @@ Example:
|
|||||||
|
|
||||||
{$FirstName}, {$LastName}<br>
|
{$FirstName}, {$LastName}<br>
|
||||||
{$Address}, {$Zipcode}
|
{$Address}, {$Zipcode}
|
||||||
>>>>>>> 1.2
|
|
||||||
{include file="footer.tpl"}
|
{include file="footer.tpl"}
|
||||||
|
|
||||||
|
|
||||||
@@ -271,7 +251,7 @@ $smarty->assign("ContactNames",array(
|
|||||||
array("email","home","fax")
|
array("email","home","fax")
|
||||||
));
|
));
|
||||||
$smarty->assign("ContactVals",array(
|
$smarty->assign("ContactVals",array(
|
||||||
array("fred@simpsons.com","555-666-7777","555-444-3333"),
|
array("ned@simpsons.com","555-666-7777","555-444-3333"),
|
||||||
array("bart@simpsons.com","555-111-2222"),
|
array("bart@simpsons.com","555-111-2222"),
|
||||||
array("monty@simpsons.com","555-888-9999","555-234-5678"),
|
array("monty@simpsons.com","555-888-9999","555-234-5678"),
|
||||||
));
|
));
|
||||||
|
2
doc.sgm
2
doc.sgm
@@ -556,7 +556,7 @@ Your last login was on January 11th, 2001.
|
|||||||
values don't have to be enclosed in quotes, but it is recommended
|
values don't have to be enclosed in quotes, but it is recommended
|
||||||
for literal strings. If not quoted, you may use a syntax that Smarty may confuse
|
for literal strings. If not quoted, you may use a syntax that Smarty may confuse
|
||||||
with another function, such as a boolean value. Variables may
|
with another function, such as a boolean value. Variables may
|
||||||
also be used, and should not be in parenthesis.
|
also be used, and should not be in quotes.
|
||||||
</para>
|
</para>
|
||||||
<example>
|
<example>
|
||||||
<title>Template example of function attribute syntax</title>
|
<title>Template example of function attribute syntax</title>
|
||||||
|
Reference in New Issue
Block a user