Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

[Smarty 2] Indentation of output (without post-processing)

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Tips and Tricks
View previous topic :: View next topic  
Author Message
gianiaz
Smarty Rookie


Joined: 14 Dec 2006
Posts: 25
Location: Italy

PostPosted: Fri Dec 07, 2012 1:57 pm    Post subject: [Smarty 2] Indentation of output (without post-processing) Reply with quote

Hi, I want to output an easy to read html source, but I don't want to use tidy or similar solutions for a couple of reasons.

What I want to do is write my own code paying attention to indent correctly and I want that smarty respect this on output.

That done, I have this simple code:

Code:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{$ACTUAL_LANGUAGE}">
   <head>
      <title>{$TITLE}</title>
      {if $KEYWORDS}<meta name="keywords" content="{$KEYWORDS}" />{/if}
      <meta name="description" content="{$DESCRIPTION}" />
....


That renders this:

Code:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="it">
   <head>
      <title>Homepage</title>
      <meta name="keywords" content="test" />      <meta name="description" content="Description della home page" />


Why the meta descriptions isn't on a new line?

I would like to understand this behaviour to decide if I have to adapt or I can change something in smarty to achieve what I want.

Thank you Smile
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Tips and Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP