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

Mit Variablen innerhalb des Templates arbeiten

 
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
FrankS
Smarty n00b


Joined: 14 Aug 2012
Posts: 2

PostPosted: Tue Aug 14, 2012 9:33 am    Post subject: Mit Variablen innerhalb des Templates arbeiten Reply with quote

Hallo zusammen,

ich habe ein Template in dem in 2 verschachtelten Schleifen Array-Inhalte ausgegeben werden. Für das Template ist das aber ungünstig.

Kann ich, ohne dass ich in den PHP Dateien etwas ändere direkt in der Template Datei mit den Variablen arbeiten?

Ich möchte zB. temporär ein neues Array erstellen, was ich dann in einer neuen Schleife ausgeben kann.

Ich habe mir das Array einmal ausgeben lassen mit {$daten|@print_r}.

Kann ich innerhalb einer Schleife soetwas machen wie hier im PHP mit Smarty-Variablen?
$temp[] = $daten[$i][0];

Danke schon mal für die Hilfe.

VG Frank
Back to top
View user's profile Send private message
Grizzly
Smarty Pro


Joined: 15 Apr 2011
Posts: 172
Location: Germany

PostPosted: Tue Aug 21, 2012 7:36 pm    Post subject: Reply with quote

Du kannst in Smarty mit assign etwas zuweisen, allerdings bringt es dir in einer Schleife ja nichts, da du dann als wert der temp-Variable immer array[lertzeIndex][0] hast...
Back to top
View user's profile Send private message Visit poster's website
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