mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-03 05:41:37 +01:00
51 lines
1.6 KiB
XML
51 lines
1.6 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision$ -->
|
|
<sect1 id="language.syntax.quotes">
|
|
<title>Incorporare variabili fra virgolette</title>
|
|
<para>
|
|
Smarty riconosce le variabili incorporate nelle stringhe fra virgolette (")
|
|
se contengono solo numeri, lettere, underscore (_) e parentesi quadre ([]).
|
|
Se sono presenti altri caratteri (punti, riferimento a oggetti, ecc.) la
|
|
variabile deve essere posta tra backticks (`). I backticks si possono ottenere
|
|
digitando ALT+96 (sul tastierino numerico).
|
|
</para>
|
|
<example>
|
|
<title>embedded quotes syntax</title>
|
|
<programlisting>
|
|
<![CDATA[
|
|
ESEMPI DI SINTASSI:
|
|
{func var="test $foo test"} <-- riconosce $foo
|
|
{func var="test $foo_bar test"} <-- riconosce $foo_bar
|
|
{func var="test $foo[0] test"} <-- riconosce $foo[0]
|
|
{func var="test $foo[bar] test"} <-- riconosce $foo[bar]
|
|
{func var="test $foo.bar test"} <-- riconosce $foo (non $foo.bar)
|
|
{func var="test `$foo.bar` test"} <-- riconosce $foo.bar
|
|
|
|
ESEMPI PRATICI:
|
|
{include file="subdir/$tpl_name.tpl"} <-- sostituisce $tpl_name col valore relativo
|
|
{cycle values="one,two,`$smarty.config.myval`"} <-- necessita di backticks
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</sect1>
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|