Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > by-pkgid > 8377d4bb25a3992aad680df2952f4b71 > files > 103

php-smarty-doc-2.6.26-1mdv2010.0.noarch.rpm

<HTML
><HEAD
><TITLE
>indent</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="Smarty Manual"
HREF="index.html"><LINK
REL="UP"
TITLE="Variable Modifiers"
HREF="language.modifiers.html"><LINK
REL="PREVIOUS"
TITLE="escape"
HREF="language.modifier.escape.html"><LINK
REL="NEXT"
TITLE="lower"
HREF="language.modifier.lower.html"><META
HTTP-EQUIV="Content-type"
CONTENT="text/html; charset=ISO-8859-1"></HEAD
><BODY
CLASS="sect1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Smarty Manual</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="language.modifier.escape.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 5. Variable Modifiers</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="language.modifier.lower.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="sect1"
><H1
CLASS="sect1"
><A
NAME="language.modifier.indent"
></A
>indent</H1
><P
>&#13;     This indents a string on each line, default is 4. As
     an optional parameter, you can specify the number of characters to
     indent. As an optional second parameter, you can specify the
     character to use to indent with eg use <TT
CLASS="literal"
>"\t"</TT
> for a tab.
  </P
><DIV
CLASS="informaltable"
><A
NAME="AEN1020"
></A
><P
></P
><TABLE
BORDER="1"
CLASS="CALSTABLE"
><THEAD
><TR
><TH
WIDTH="20%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>Parameter Position</TH
><TH
WIDTH="20%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>Type</TH
><TH
WIDTH="20%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>Required</TH
><TH
WIDTH="20%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>Default</TH
><TH
WIDTH="20%"
ALIGN="LEFT"
VALIGN="MIDDLE"
>Description</TH
></TR
></THEAD
><TBODY
><TR
><TD
WIDTH="20%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>1</TD
><TD
WIDTH="20%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>integer</TD
><TD
WIDTH="20%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>No</TD
><TD
WIDTH="20%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>4</TD
><TD
WIDTH="20%"
ALIGN="LEFT"
VALIGN="MIDDLE"
>This determines how many characters to indent
       to.</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>2</TD
><TD
WIDTH="20%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>string</TD
><TD
WIDTH="20%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>No</TD
><TD
WIDTH="20%"
ALIGN="CENTER"
VALIGN="MIDDLE"
>(one space)</TD
><TD
WIDTH="20%"
ALIGN="LEFT"
VALIGN="MIDDLE"
>This is the character used to indent with.</TD
></TR
></TBODY
></TABLE
><P
></P
></DIV
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
CLASS="EXAMPLE"
><TR
><TD
><DIV
CLASS="example"
><A
NAME="AEN1047"
></A
><P
><B
>Example 5-12. indent</B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /><br />$smarty</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">assign</span><span style="color: #007700">(</span><span style="color: #DD0000">'articleTitle'</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">'NJ&nbsp;judge&nbsp;to&nbsp;rule&nbsp;on&nbsp;nude&nbsp;beach.<br />Sun&nbsp;or&nbsp;rain&nbsp;expected&nbsp;today,&nbsp;dark&nbsp;tonight.<br />Statistics&nbsp;show&nbsp;that&nbsp;teen&nbsp;pregnancy&nbsp;drops&nbsp;off&nbsp;significantly&nbsp;after&nbsp;25.'<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></TD
></TR
></TABLE
><P
>&#13;    Where template is:
   </P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><PRE
CLASS="programlisting"
>{$articleTitle}

{$articleTitle|indent}

{$articleTitle|indent:10}

{$articleTitle|indent:1:"\t"}</PRE
></TD
></TR
></TABLE
><P
>&#13;    Will output:
   </P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><PRE
CLASS="screen"
>NJ judge to rule on nude beach.
Sun or rain expected today, dark tonight.
Statistics show that teen pregnancy drops off significantly after 25.

    NJ judge to rule on nude beach.
    Sun or rain expected today, dark tonight.
    Statistics show that teen pregnancy drops off significantly after 25.

          NJ judge to rule on nude beach.
          Sun or rain expected today, dark tonight.
          Statistics show that teen pregnancy drops off significantly after 25.

        NJ judge to rule on nude beach.
        Sun or rain expected today, dark tonight.
        Statistics show that teen pregnancy drops off significantly after 25.</PRE
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
><P
>&#13;   See also
   <A
HREF="language.modifier.strip.html"
><TT
CLASS="varname"
>strip</TT
></A
>,
   <A
HREF="language.modifier.wordwrap.html"
><TT
CLASS="varname"
>wordwrap</TT
></A
>
   and
   <A
HREF="language.modifier.spacify.html"
><TT
CLASS="varname"
>spacify</TT
></A
>.
  </P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="language.modifier.escape.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="language.modifier.lower.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>escape</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="language.modifiers.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>lower</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>