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

Variabile non riconosciuta

 
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: Italian
View previous topic :: View next topic  
Author Message
nikit0
Smarty Rookie


Joined: 26 Jan 2012
Posts: 5

PostPosted: Thu Jan 26, 2012 12:21 am    Post subject: Variabile non riconosciuta Reply with quote

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
View user's profile Send private message
belfus
Smarty Rookie


Joined: 30 Jul 2012
Posts: 6

PostPosted: Tue Jul 31, 2012 3:05 pm    Post subject: Reply with quote

Ma hai provato a stamparla in questo modo {$listing.Powerr}?
Back to top
View user's profile Send private message
belfus
Smarty Rookie


Joined: 30 Jul 2012
Posts: 6

PostPosted: Tue Jul 31, 2012 3:05 pm    Post subject: Reply with quote

belfus wrote:
Ma hai provato a stamparla in questo modo {$listing.Powerr}?


logicamente senza ?
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: Italian 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