mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-09 08:41:39 +01:00
107 lines
2.5 KiB
XML
107 lines
2.5 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!-- $Revision$ -->
|
|
<sect1 id="language.syntax.comments">
|
|
<title>Komentar</title>
|
|
<para>
|
|
Komentar template dikelilingi oleh bintang, dan ditutup oleh tag
|
|
<link linkend="variable.left.delimiter">pembatas</link>
|
|
seperti:
|
|
</para>
|
|
<informalexample>
|
|
<programlisting>
|
|
<![CDATA[
|
|
{* ini adalah sebuah komentar *}
|
|
]]>
|
|
</programlisting>
|
|
</informalexample>
|
|
<para>
|
|
Komentar Smarty TIDAK ditampilkan dalam output template final, tidak seperti
|
|
<literal><!-- HTML comments --></literal>.
|
|
Ini berguna untuk membuat catatan internal dalam template yang tak seorangpun
|
|
akan melihatnya ;-)
|
|
</para>
|
|
<example>
|
|
<title>Komentar di dalam template</title>
|
|
<programlisting>
|
|
<![CDATA[
|
|
{* Saya adalah komentar Smarty, Saya tidak ada dalam output terkompilasi *}
|
|
<html>
|
|
<head>
|
|
<title>{$title}</title>
|
|
</head>
|
|
<body>
|
|
|
|
{* komentar smarti satu baris lainnya *}
|
|
<!-- HTML comment that is sent to the browser -->
|
|
|
|
{* ini komentar smarty
|
|
multi baris
|
|
tidak dikirimkan ke browser
|
|
*}
|
|
|
|
{*********************************************************
|
|
Blok komentar multi baris dengan blok penghargaan
|
|
@ pembuat: bg@example.com
|
|
@ pemeliharan support@example.com
|
|
@ para: var yang menetapkan gaya blok
|
|
@ css: gaya output
|
|
**********************************************************}
|
|
|
|
{* File header dengan logo utama dan lainnya *}
|
|
{include file='header.tpl'}
|
|
|
|
|
|
{* Catatan Dev: var $includeFile ditempatkan dalam naskah foo.php *}
|
|
<!-- Displays main content block -->
|
|
{include file=$includeFile}
|
|
|
|
{* blok <select> ini mubazir *}
|
|
{*
|
|
<select name="company">
|
|
{html_options options=$vals selected=$selected_id}
|
|
</select>
|
|
*}
|
|
|
|
<!-- Show header from affiliate is disabled -->
|
|
{* $affiliate|upper *}
|
|
|
|
{* you cannot nest comments *}
|
|
{*
|
|
<select name="company">
|
|
{* <option value="0">-- none -- </option> *}
|
|
{html_options options=$vals selected=$selected_id}
|
|
</select>
|
|
*}
|
|
|
|
|
|
{* tag cvs untuk template, di bawah 36 HARUS kurs amerika
|
|
. akan tetapi ia diubah dalam cvs.. *}
|
|
{* $Id: Exp $ *}
|
|
{* $Id: *}
|
|
</body>
|
|
</html>
|
|
]]>
|
|
</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
|
|
-->
|