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



 
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 -> Installation and Setup
View previous topic :: View next topic  
Author Message
patrmich
Smarty Rookie


Joined: 13 Nov 2012
Posts: 7

PostPosted: Sat Nov 07, 2015 3:41 pm    Post subject: Reply with quote

Bonjour,

Dans un fichier template de Prestashop (.tpl), se trouve la variable suivante :
$Essai->Test

Le contenu de Test est du type suivant :
chaine1*chaine2*chaine3

Si nécessaire, je pourrais remplacer le séparateur * par un autre séparateur comme - ou : ou autre chose.
Je pourrais aussi faire en sorte que le contenu de Test soit de la forme :
chaine1*chaine2-chaine3 (c'est à dire avec le premier séparateur * différent du deuxième séparateur -)

Avec le modificateur truncate, il est possible de récupérer le début du contenu de la variable.

Mais ce que je souhaiterais faire est récupérer la chaine1, la chaine2 et la chaine3

Je suis novice en programmation...

Merci par avance pour toute aide.

Patrick
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 -> Installation and Setup 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