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

Notion de bloc dans Smarty ?

 
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 -> Language: French
View previous topic :: View next topic  
Author Message
kaboume
Smarty n00b


Joined: 29 Oct 2007
Posts: 1

PostPosted: Mon Oct 29, 2007 11:13 am    Post subject: Notion de bloc dans Smarty ? Reply with quote

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
View user's profile Send private message
Vynka
Smarty Rookie


Joined: 30 Apr 2003
Posts: 17
Location: Belgium

PostPosted: Mon Dec 24, 2007 3:12 pm    Post subject: Reply with quote

Euh ?

Code:
{if $resultat != ""}
    Résultat : {$resultat}
{/if}


Cà ?
_________________
Au pays des Gloups!
http://www.wishlist.lu
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 -> Language: French 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