Get Smarty

Donate

Donate Bitcoin Bitcoin
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

Check reviews of PHP Web Hosting, compatible with Smarty Templates

Largest classified with thousands of ads at Shoppok

Buy cheap eyeglasses from Cheapglasses123.com and save up to 80%.

Buy wedding dresses on SiteSteer.com - Best Online Wedding Dress Store

Candy Crush Cheats

Tired of playing games? Visit the Game Supply to Sell World of Warcraft Accounts.

Buy prescription glasses from www.australiaglasses.com and save.

Cheap Glasses Now On Sale at GlassesPeople.com. Starts At $7.95.

Where to buy discount wedding dresses and cheap smart dresses free shipping - Weddingdresstrend.com

{strip}

Many times web designers run into the issue where white space and carriage returns affect the output of the rendered HTML (browser "features"), so you must run all your tags together in the template to get the desired results. This usually ends up in unreadable or unmanageable templates.

Anything within {strip}{/strip} tags are stripped of the extra spaces or carriage returns at the beginnings and ends of the lines before they are displayed. This way you can keep your templates readable, and not worry about extra white space causing problems.

Note

{strip}{/strip} does not affect the contents of template variables, see the strip modifier instead.

Example 7.78. {strip} tags


{* the following will be all run into one line upon output *}
{strip}
<table border='0'>
 <tr>
  <td>
   <a href="{$url}">
    <font color="red">This is a test</font>
   </a>
  </td>
 </tr>
</table>
{/strip}

  

The above example will output:


<table border='0'><tr><td><a href="http://. snipped...</a></td></tr></table>

  

Notice that in the above example, all the lines begin and end with HTML tags. Be aware that all the lines are run together. If you have plain text at the beginning or end of any line, they will be run together, and may not be desired results.

See also the strip modifier.

Comments
No comments for this page.
Post a Comment
All comments are moderated. Support questions are ignored, use the forums instead.
Author:
Email: (not shown)
What is 2 plus 4? (Are you human?)

Sponsors [info]

UK Web Hosting @webhost.uk.net
Best Web Hosting @rshosting.com
Web Hosting UK @webhostinguk.com
Unlimited Web Hosting @infrenion.com
App Entwicklung @morphodo.com
Buy from China @dhgate.com
dissertationteam.com
Buy Web Hosting @buy-hosting.net
WordPress Hosting Hub @wphostinghub.net