|
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 |
timo_ipark Smarty Rookie
Joined: 24 Apr 2004 Posts: 8
|
Posted: Fri Nov 05, 2004 6:53 am Post subject: Nichtgefundene Variablen nicht parsen... |
|
|
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 |
|
coach Smarty Regular
Joined: 03 Jun 2004 Posts: 65
|
Posted: Fri Nov 05, 2004 6:55 pm Post subject: Re: Nichtgefundene Variablen nicht parsen... |
|
|
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 |
|
|
|
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
|