Re: [SMARTY] Indenting....

From: Date: Tue, 21 May 2002 18:12:45 +0000
Subject: Re: [SMARTY] Indenting....
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-4336@lists.php.net to get a copy of this message
I _think_ that is because the {section} tag _and_ the carriage return after the {section} tag gets removed. Example,if you could seee tabs and carriage returns, your template source looks like this: <tab>{section ...}<cr> <tab><tr><cr> <tab><td>whatever</td><cr> <tab></tr><cr> <tab>{/section}<cr> and the output ends up like this: <tab><tab><tr><cr> <tab><td>whatever</td><cr> <tab></tr><cr> <tab> See, now there are two tabs in front of your <tr> tag. Gandalf wrote:
Hello! Im completely new to Smarty and was wondering if anybody could enlighten me a bit. Why is it that if i do the following
        {section name=q loop=$z}
        <tr>
        <td> whatever</td>
        </tr>
        {/section}
And then view the source code in my browser it displays it like this
                <tr>
        <td> whatever</td>
        </tr>
Whereas if i do as follows (note the linebreak between section and <tr>)
        {section name=q loop=$z}
        <tr>
        <td> whatever</td>
        </tr>
        {/section}
And view the source code in my browser it will display it as i want
        <tr>
        <td> whatever</td>
        </tr>
How come? I don`t want Smarty to auto indent anything, is there an option for this or is it just me who has this?
Any help would be greatly appreciated. Thanks a lot in advance for your time. Best regards from Vienna, Jürgen
-- Monte Ohrt <monte@ispi.net> Director of Technology, ispi Inc.

« previous php.smarty.general (#4336) next »