|
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 |
nikit0 Smarty Rookie
Joined: 26 Jan 2012 Posts: 5
|
Posted: Thu Jan 26, 2012 12:21 am Post subject: Variabile non riconosciuta |
|
|
Ciao a tutti!
vi scrivo per avere un supporto con smarty,
io ho una variabile $listing.Powerr che ha già un valore immesso dall'utente nel momento in cui effettua l'inserzione e che mando in output in questo modo [[$listing.Powerr]] e fin quà tutto ok, nel momento in cui però faccio fare un'operazione per ricavare i Kw dai CV non riconosce il valore della variabile e quindi non esegue l'operazione che dovrebbe fare:
Code: | {if $listing.Powerr != ''}
<tr><td>
[[Power1]]:</td>
<td><b>{math equation="x / y" x=$listing.Powerr y=1.36 format="%.0f"}Kw([[$listing.Powerr]]CV)</b>
</td></tr>{/if} |
in poche parole gli dico, che X è 415 che è il valore di $listing.Power nel caso di questo utente e Y 1.36 è quanto devo dividere per ottenere i kw. Il problema è che non riconosce la variabile........ quando invece semplicemente mandandola in output riconosce [[$listing.Powerr]].... qualcuno di voi mi sa consigliare???
vi ringrazio moltissimo |
|
Back to top |
|
belfus Smarty Rookie
Joined: 30 Jul 2012 Posts: 6
|
Posted: Tue Jul 31, 2012 3:05 pm Post subject: |
|
|
Ma hai provato a stamparla in questo modo {$listing.Powerr}? |
|
Back to top |
|
belfus Smarty Rookie
Joined: 30 Jul 2012 Posts: 6
|
Posted: Tue Jul 31, 2012 3:05 pm Post subject: |
|
|
belfus wrote: | Ma hai provato a stamparla in questo modo {$listing.Powerr}? |
logicamente senza ? |
|
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
|