Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
Array an eine Methode im Template übergeben

 
Post new topic   Reply to topic    Smarty Forum Index -> Language: German
View previous topic :: View next topic  
Author Message
eazytrader
Smarty Rookie


Joined: 16 Jul 2010
Posts: 32

PostPosted: Tue Mar 19, 2013 2:20 pm    Post subject: Array an eine Methode im Template übergeben Reply with quote

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
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 4670
Location: Hamburg / Germany

PostPosted: Tue Mar 19, 2013 7:15 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    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