PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > php.smarty.general > with this
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
with this

Réponse
 
LinkBack Outils de la discussion
Vieux 03/02/2006, 17h05   #1
messju mohr
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [SMARTY] with this

On Fri, Feb 03, 2006 at 12:54:42PM -0500, Reynier Perez Mira wrote:
> Hi:
> I read the Smarty documentation after po:st any messages on list or Smarty Forum. I need to set up a comparison with some vars came from GET (URL: http://localhost/index.php?var=value). I see this: $smarty.get.var. So if I do this in TPL file: {$smarty.get.var} and this print "value". So if I try this other:
> {if $smarty.get.var eq "value"}
> DEBUG: true
> {else}
> DEBUG: false;
> {/if}
>
> Nothing happen. How I can compare the $smarty.get.var with the real value for do some things?


you don't want to. you want to do this in php and not in the template.
forget about request vars like $_GET in the template. they are evil.

> Regards
> ReynierPM
> 4to. año Ing. Informática
> Usuario registrado de Linux: #310201

  Réponse avec citation
Vieux 03/02/2006, 17h54   #2
Reynier Perez Mira
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut with this

Hi:
I read the Smarty documentation after po:st any messages on list or Smarty Forum. I need to set up a comparison with some vars came from GET (URL: http://localhost/index.php?var=value). I see this: $smarty.get.var. So if I do this in TPL file: {$smarty.get.var} and this print "value". So if I try this other:
{if $smarty.get.var eq "value"}
DEBUG: true
{else}
DEBUG: false;
{/if}

Nothing happen. How I can compare the $smarty.get.var with the real value for do some things?

Regards
ReynierPM
4to. año Ing. Informática
Usuario registrado de Linux: #310201
************************************************** ***********************
El programador superhéroe aprende de compartir sus conocimientos.
Es el referente de sus compañeros. Todo el mundo va a preguntarle y él, secretamente, lo fomenta porque es así como adquiere su legendaria
sabiduría: escuchando ayudando a los demás...
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 23h25.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,06853 seconds with 10 queries