|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
kaboume Smarty n00b
Joined: 29 Oct 2007 Posts: 1
|
Posted: Mon Oct 29, 2007 11:13 am Post subject: Notion de bloc dans Smarty ? |
|
|
hello,
Est-ce que quelqu'un pourrait me dire si la notion de bloc existe dans Smarty.
En effet, dans le moteur de tempates de PHPlib on peut définir des blocs dans le tempatesque l'on peut décider d'afficher ou pas.
J'ai besoin de cette notion de bloc car dans mon template, j'ai un truc du genre :
Code: |
Résultat : {$resultat}
|
et ce que j'aimerai, c''est ne pas afficher cette ligne si la variable $resultat est vide. Donc j'avais pensé à un bloc qui engloberait cette ligne.
Si la notion de bloc n'existe pas dans Smarty, est-qu'il y aurait une autre solution à mon problème ?
Merci d'avance.
[/code] |
|
Back to top |
|
Vynka Smarty Rookie
Joined: 30 Apr 2003 Posts: 17 Location: Belgium
|
Posted: Mon Dec 24, 2007 3:12 pm Post subject: |
|
|
Euh ?
Code: | {if $resultat != ""}
Résultat : {$resultat}
{/if} |
Cà ? _________________ Au pays des Gloups!
http://www.wishlist.lu |
|
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
|