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

Une petite question pour $_SESSION dans mon .tpl

 
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
abrioit
Smarty n00b


Joined: 07 Dec 2008
Posts: 2

PostPosted: Sun Dec 07, 2008 10:42 am    Post subject: Une petite question pour $_SESSION dans mon .tpl Reply with quote

Bonjour à tous
Pouvez vous m'aider car je suis en grande difuculté.

Comment mettre ce code sur mon tpl ? car je veux afficher mon formulaire

Code:
if(isset($_SESSION['login']))
{
{foreach item=actu from=$blocNewsarticle}
{$actu.titre}
{/foreach}
}

else
{
echo 'Vous etes pas conecté';
}


Je vous remercie
Back to top
View user's profile Send private message
Gowser
Smarty Pro


Joined: 19 Feb 2008
Posts: 104
Location: Nantes (France)

PostPosted: Thu Sep 10, 2009 2:38 pm    Post subject: Reply with quote

Bonjour,

Voici la solution :

Code:

{if isset($smarty.session.login)}
{foreach item=actu from=$blocNewsarticle}
{$actu.titre}
{/foreach}
{else}
Vous etes pas conecté
{/if}


Voir : http://www.smarty.net/manual/fr/language.variables.smarty.php

Voilou, ++
Back to top
View user's profile Send private message Send e-mail
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