|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
toams69 Smarty Rookie
Joined: 11 Dec 2010 Posts: 7
|
Posted: Mon Jan 31, 2011 9:39 am Post subject: Fichier et variable de conf smarty |
|
|
Bonjour
J'aurai besoin d'aide pour un petit problème au niveau des variables de config de smarty.
J'ai bien compris comment cela fonctionnait.
J ai donc un fichier qui ressemble a ca
cat_1 = 0
cat_2 = 1
cat_3 = 1
je voulai savoir si il etait possible dans le .tpl de recuperer ces variables de config de manière dynamique.
En gros un truc du genre
{section name=idx loop=$smarty_catList}
{if !isset($smarty.config.cat_.$smarty.section.idx.index) && $smarty.config.cat_.$smarty.section.idx.index = 1}coucou{/if}/>
{/section}
J'aimerai faire ceci, car dans mon site web j aimerai avoir une partie ou je puisse configurer les catégories qui seront visibles dans d autres pages, mais je voudrai pouvoir ajouter des catégories plus tard a la volé.
J'espère avoir été assez clair, merci d'avance pour votre aide |
|
Back to top |
|
|
|
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
|