Cleaned up some ws and another example

This commit is contained in:
pete_morgan
2006-03-26 14:59:10 +00:00
parent 353baf9123
commit 44fdef7a4d

View File

@@ -69,11 +69,11 @@
</note>
<example>
<title>{eval}</title>
<programlisting>
<![CDATA[
setup.conf
----------
#setup.conf
#----------
emphstart = <strong>
emphend = </strong>
title = Welcome to {$company}'s home page!
@@ -82,16 +82,16 @@
]]>
</programlisting>
<para>
Where index.tpl is:
Where the template is:
</para>
<programlisting>
<![CDATA[
{config_load file="setup.conf"}
{config_load file='setup.conf'}
{eval var=$foo}
{eval var=#title#}
{eval var=#ErrorCity#}
{eval var=#ErrorState# assign="state_error"}
{eval var=#ErrorState# assign='state_error'}
{$state_error}
]]>
</programlisting>
@@ -104,10 +104,33 @@
Welcome to Foobar Pub & Grill's home page!
You must supply a <strong>city</strong>.
You must supply a <strong>state</strong>.
]]>
</screen>
</example>
<example>
<title>another {eval} example</title>
<para>This example outputs the server name and IP.
The variable $str could be from a database for example.</para>
<programlisting role="php">
<![CDATA[
// php script
$str = 'The server name is {$smarty.server.SERVER_NAME|upper} '
'at {$smarty.server.SERVER_ADDR}';
$smarty->assign('foo',$str);
]]>
</programlisting>
<para>
Where the template is:
</para>
<programlisting>
<![CDATA[
{eval var=$foo}
]]>
</programlisting>
</example>
</sect1>
<!-- Keep this comment at the end of the file
Local variables: