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

Strings nach Template vars parsen

 
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
kills
Smarty Elite


Joined: 28 May 2004
Posts: 493

PostPosted: Sun Jun 13, 2004 3:43 pm    Post subject: Strings nach Template vars parsen Reply with quote

Hallo zusammen,

ich lese strings aus meiner DB aus, die schon mit template vars belegt sind.

z.b.
Code:

?section={ $sSection }&action=admin/login


wenn ich diese dem template so "assign"-e, dann sind logischerweise die variblen nicht durch ihre werte ersetzt, sondern es stehen noch die variablennamen im source.

wie kann ich diesen string parsen, damit die variablen durch ihre werte ersetzt werden?
Back to top
View user's profile Send private message
coach
Smarty Regular


Joined: 03 Jun 2004
Posts: 65

PostPosted: Mon Jun 14, 2004 9:13 pm    Post subject: Re: Strings nach Template vars parsen Reply with quote

Hallo,

Code:

?section={ $sSection }&action=admin/login


Wie wäre es, wenn du vor dem assignen die Variablen ersetzt, z.B. mit sprinft. http://de3.php.net/manual/de/function.sprintf.php

Oder per regulärem Ausdruck (auch vor assign) alle $name durch ihren Wert ersetzen.



Maik
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