Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
[Smarty 2] Indentation of output (without post-processing)

 
Post new topic   Reply to topic    Smarty Forum Index -> Tips and Tricks
View previous topic :: View next topic  
Author Message
gianiaz
Smarty Rookie


Joined: 14 Dec 2006
Posts: 24
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:   
Post new topic   Reply to topic    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