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

Smarty-Variable in PHP verwenden

 
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
Oliver
Smarty Rookie


Joined: 11 Nov 2014
Posts: 6

PostPosted: Tue Nov 11, 2014 7:26 am    Post subject: Smarty-Variable in PHP verwenden Reply with quote

Hallo zusammen,

ich steh auf'm Schlauch und hoffe, hier kann mir jemand runterhelfen:

ist es möglich, direkt aus PHP raus auf Smarty-Variablen zuzugreifen? Ich meine NICHT aus HTML-Dateien sondern tatsächlich aus dem laufenden PHP-Code raus.

Nur mit $name ist die Variable leer, in geschweiften Klammern gibt's einen Fehler und $Smarty.name ist auch leer.

Was überseh ich da?

Danke und liebe Grüße
Oliver
Back to top
View user's profile Send private message
U.Tews
Administrator


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

PostPosted: Tue Nov 11, 2014 5:56 pm    Post subject: Reply with quote

Siehe http://www.smarty.net/docs/en/api.get.template.vars.tpl
Back to top
View user's profile Send private message
Oliver
Smarty Rookie


Joined: 11 Nov 2014
Posts: 6

PostPosted: Wed Nov 12, 2014 7:06 am    Post subject: Reply with quote

vielen Dank für den Tipp.

Aber, wenn ich "$all_tpl_vars = $smarty->getTemplateVars();" in mein Skript einfüge, bekomme ich einen Netzwerkfehler (500, internal Server error) und die Seite bleibt komplett weiß. Kannst Du mir da bitte auch noch einen Hinweis gegen.

Danke und einen schönen Tag
Oliver
Back to top
View user's profile Send private message
U.Tews
Administrator


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

PostPosted: Wed Nov 12, 2014 4:01 pm    Post subject: Reply with quote

Da musst Du genauere Angaben machen wo, wie und wann Du die Variablen abfragen willst.
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