|
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 |
eazytrader Smarty Rookie
Joined: 16 Jul 2010 Posts: 33
|
Posted: Tue Mar 19, 2013 2:20 pm Post subject: Array an eine Methode im Template übergeben |
|
|
Hallo Leute,
ich habe gerade folgendes Problem.
Eine Methode, die ich im Template aufrufe, benötigt ein Array.
Das klappt allerdings leider nicht. Es wird ein Fehler ausgegeben, wenn ich es folgendermaßen mache:
Code: | {translate::string('cart_header_items_text', array('items' => $header_cart.items, 'total' => $header_cart.total, 'link_cart' => $header_cart.link_cart))} |
Hat jemand eine Idee wie ich das anders lösen kann?
Danke euch. |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Tue Mar 19, 2013 7:15 pm Post subject: |
|
|
In Smarty3 werden Arrays mit [...] definiert.
Code: | {translate::string('cart_header_items_text', ['items' => $header_cart.items, 'total' => $header_cart.total, 'link_cart' => $header_cart.link_cart])} |
|
|
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
|