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

config_load: dynamisch auf Einträge zugreifen

 
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: German
View previous topic :: View next topic  
Author Message
diede
Smarty n00b


Joined: 17 Sep 2004
Posts: 2

PostPosted: Fri Sep 17, 2004 2:21 pm    Post subject: config_load: dynamisch auf Einträge zugreifen Reply with quote

Hallo zusammen,

ich habe folgende Konfigurationsdatei zur Abbildung von Menueinträgen:

(...)
# global variables
MNU_MENU1 = Menu1
MNU_MENU2 = Menu2
(...)

Ich habe im Template nun eine Schleife implementiert, die mir aus einem Hash die Schlüssel ausliest.
(...)
{foreach name=menuitems item=menuitem from=$menu}
{$menuitem}
{/foreach}
(...)

In $menuitem sind die darzustellenden Schlüssel enthalten: MNU_MENU1, MNU_MENU2,... und werden ausgegeben....

Gibt es eine Möglichkeit, {$menuItem} vorher auszuwerten, so dass letztendlich die Tags {#MNU_MENU1#}, {#MNU_MENU2#}, ... zur Ausgabe der Werte der Schlüssel verwendet werden können... ?
{#{$menuitem}#} funktioniert nicht....

Für Eure Mühe im voraus vielen Dank.

Gruß,
diede
Back to top
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Fri Sep 17, 2004 2:38 pm    Post subject: Reply with quote

{$smarty.config.$menuitem}
siehe: http://smarty.php.net/manual/en/language.variables.smarty.php
($smarty.config schein in der deutschen Übersetzung noch zu fehlen)

gruß
messju
Back to top
View user's profile Send private message Send e-mail Visit poster's website
diede
Smarty n00b


Joined: 17 Sep 2004
Posts: 2

PostPosted: Fri Sep 17, 2004 2:45 pm    Post subject: Reply with quote

Hallo !

Vielen Dank für die schnelle Antwort... =)

Gruß,
diede
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: German 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