Get Smarty

Donate

Paypal

Smarty Icon

You may use the Smarty logo according to the trademark notice.

Smarty Template Engine Smarty Template Engine

For sponsorship, advertising, news or other inquiries, contact us at:

Sites Using Smarty

Advertisement

Chapter 3. Basic Syntax

Todas las etiquetas del template deben estar marcadas por delimitadores. Por default , estos delimitadores son { y }, sino estos pueden cambiar.

Para estos ejemplos, nosotros asumiremos que usted está usando los delimitadores por default. En Smarty, todo el contenido fuera de los delimitadores es mostrado como contenido estatico, o igual(sin cambios). Cuando Smarty encuentra etiquetas en el template, trata de interpretarlos, e intenta mostrar la salida apropiada en su lugar.

Comentarios

Los comentarios en los templates son cercados por asteriscos, y por los delimitadores, así: {* este es un comentario *}. Los comentarios en Smarty no son mostrados en la salida final del template. semejantes a <!-- HTML comments --> Estos son usados para hacer notas internas dentro del template.

Example 3.1. Comentarios


<body>
{* this multiline
    comment is
   not sent to browser
*}

{* include the header file here *}
{include file="header.tpl"}


{* Dev note:  $includeFile is assigned foo.php script  *}
<!-- this html comment is sent to browser -->
{include file=$includeFile}

{include file=#includeFile#}

{* display dropdown lists *}
<select name="company">
  {html_options options=$vals selected=$selected_id}
</select>
</body>

  

Comments
No comments for this page.

Advertisement

Sponsors [info]

Sponsors