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

Nichtgefundene Variablen nicht 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
timo_ipark
Smarty Rookie


Joined: 24 Apr 2004
Posts: 8

PostPosted: Fri Nov 05, 2004 6:53 am    Post subject: Nichtgefundene Variablen nicht parsen... Reply with quote

Hallo,

gibt es eine Möglichkeit, dass Smarty nicht-gefundene Variablen nicht parst? Wenn also in einem Template eine Variable {$firstname} enthalten ist, ich bei bzw. vor der Ausgabe (bei mir über fetch) diese Variable jedoch nicht zuweise, dass dann in dem Resulttag noch immer der String {$firstname} enthalten ist?

Oder besteht irgendwie die Möglichkeit, bestimmte Passagen im Template vom Parsen auszuschließen?

Das einzige was mir bisher eingefallen ist, ist eine Ersetzung von {$firstname} durch {$firstname}. So ist das Tag wenigstens nach dem Parsen noch im Template - ist aber nicht wirklich elegant.

MfG

Timo
Back to top
View user's profile Send private message
coach
Smarty Regular


Joined: 03 Jun 2004
Posts: 65

PostPosted: Fri Nov 05, 2004 6:55 pm    Post subject: Re: Nichtgefundene Variablen nicht parsen... Reply with quote

Hallo Timo,

timo_ipark wrote:

Das einzige was mir bisher eingefallen ist, ist eine Ersetzung von {$firstname} durch {$firstname}. So ist das Tag wenigstens nach dem Parsen noch im Template - ist aber nicht wirklich elegant.


ich weiß zwar nicht was da jetzt der Unterschied ist und was du genau meinst, aber mit

Code:

{if isset($firstname)}{$firstname}{/if}


gibt es weder eine Warning, noch eine Ausgabe.



Coach
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