 |
Smarty
The discussions here are for Smarty, a template engine for the PHP programming language. Dedicated server web hosting provided by Guru-host.eu. |
| View previous topic :: View next topic |
| Author |
Message |
Salino Smarty n00b
Joined: 28 Jun 2012 Posts: 2
|
Posted: Thu Jun 28, 2012 12:34 pm Post subject: Smarty causes gaps in HTML |
|
|
Hello people,
I'm new to smarty so bear with me.
When I use Smarty, the smarty part causes gaps in my HTML. Like so
Temp:
{if something is true}
<span>some HTML</span>
{/if}
<span>some other HTML</span>
HTML output:
//<---gap in HTML
<span>some HTML</span>
//<---gap in HTML
<span>some other HTML</span>
Do you know what I mean? It makes my HTML look cluttered.
Maybe I'm doing it wrong, but there must be a way around it?
thanks for your help! |
|
| Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 4177 Location: Hamburg / Germany
|
Posted: Thu Jun 28, 2012 4:24 pm Post subject: |
|
|
Everything outside the {...} will be included in the html output, also the newlines after the }.
If you don't like it you must write:
{if something is true}<span>some HTML</span>{/if}
<span>some other HTML</span> |
|
| Back to top |
|
rodneyrehm Administrator

Joined: 30 Mar 2007 Posts: 698 Location: Germany, border to Switzerland
|
|
| Back to top |
|
Salino Smarty n00b
Joined: 28 Jun 2012 Posts: 2
|
Posted: Fri Jun 29, 2012 6:58 am Post subject: |
|
|
| Thank you guys! That helps. |
|
| Back to top |
|
|
|
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
|