February 12th, 2010, 03:27 AM
-
WML variables inside php smarty
Code:
//header..........
<wml>
<do type="accept" label="call" name="call">
<go href="{if $(loc) eq 1 } {'wtai://wp/ap;4321;ganesh1'} {else} wtai://wp/ap;{$selectedContact} {/if}">
</do>
<select multiple="false" name="selectedContact" iname="loc" ivalue="1" value="HTML">
<option value="HTML">HTML Tutorial</option>
<option value="XML">XML Tutorial</option>
<option value="WML">WML Tutorial</option>
</select>
</wml>
the above code shows select box with a default value. When i am in this page and do not select anything manually then default value of $(loc) is 1.
but how do i use $(loc) inside the if condtion. the red color font $(loc) is the error.
Above code is written using the smarty in a template file test.tpl
How do i solve the error invalid tag $(loc) and use it inside the if condtion
Reply With Quote
April 20th, 2010, 11:34 AM
-
Originally Posted by ganesh_mak
Code:
//header..........
<wml>
<do type="accept" label="call" name="call">
<go href="{if $(loc) eq 1 } {'wtai://wp/ap;4321;ganesh1'} {else} wtai://wp/ap;{$selectedContact} {/if}">
</do>
<select multiple="false" name="selectedContact" iname="loc" ivalue="1" value="HTML">
<option value="HTML">HTML Tutorial</option>
<option value="XML">XML Tutorial</option>
<option value="WML">WML Tutorial</option>
</select>
</wml>
the above code shows select box with a default value. When i am in this page and do not select anything manually then default value of $(loc) is 1.
but how do i use $(loc) inside the if condtion. the red color font $(loc) is the error.
Above code is written using the smarty in a template file test.tpl
How do i solve the error invalid tag $(loc) and use it inside the if condtion
Reply With Quote
use POST or GET. $(var) is only inside output.