mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-02 05:11:36 +01:00
56 lines
1.5 KiB
XML
56 lines
1.5 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
|
|
<sect1 id="language.function.literal">
|
|
<title>literal</title>
|
|
<para>
|
|
Les balises "literal" permettent à un bloc de données d'être pris tel
|
|
quel, sans qu'il ne soit interprété par Smarty. Très pratique lors
|
|
de l'emplois d'éléments tels que javascript, acolades et autres
|
|
qui peuvent confondre le moteur de template. Tout le contenu situé
|
|
entre les balises {literal}{/literal} ne sera pas interprété, et
|
|
affiché comme du contenu statique.
|
|
</para>
|
|
<example>
|
|
<title>balises literal</title>
|
|
<programlisting>
|
|
{literal}
|
|
<script language=javascript>
|
|
|
|
<!--
|
|
function isblank(field) {
|
|
if (field.value == '')
|
|
{ return false; }
|
|
else
|
|
{
|
|
document.loginform.submit();
|
|
return true;
|
|
}
|
|
}
|
|
// -->
|
|
|
|
</script>
|
|
{/literal}</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
|
|
-->
|