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

nom de variable smarty composé d1 chaine et d1 variable

 
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
escteban
Smarty Rookie


Joined: 20 Apr 2007
Posts: 10

PostPosted: Wed May 02, 2007 12:43 pm    Post subject: nom de variable smarty composé d1 chaine et d1 variable Reply with quote

Bonjour a tous,

Je voudrais savoir si qq un peut m'aider a trouver comment faire dans smarty l equivalent de

${$autre_var."string"}

en php?

Merci par avance pour vos reponses.
Back to top
View user's profile Send private message
Shepard8
Smarty n00b


Joined: 08 Aug 2007
Posts: 2

PostPosted: Wed Aug 08, 2007 7:46 pm    Post subject: Reply with quote

Peut-être un début de réponse, mais vachement complexe pour si peu ^^ Au moins ça fonctionne, si quelqu'un trouve mieux ...

Code:
{assign var="test_nom" value="C'est la variable qu'on veut afficher; test est stocké dans la variable [dynvar] et _nom est ajouté [à la main]."}
{assign var="dynvar" value="test"}
{capture assign="dyn"}{ldelim}${$dynvar}_nom{rdelim}{/capture}{eval var=$dyn}


Peut-être que ce serait une bonne idée d'en faire une fonction utilisateur ?
Back to top
View user's profile Send private message
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