mergozzo
6 Sep 2011, 2:54 AM
Hi,
I'm having difficulty finding a way to use the XTemplate with a
string comparison. For instance, how would you adapt the following code
to search for any name beginning with D?
<p>Name: {name}</p>
<p>Company: {company}</p>
<p>Location: {location}</p>
<p>Salary: {income:currency}</p>
<p>Kids:</p>
<tpl for="kids" if="name=='Darrell Meyer'">
<tpl if="age > 1"><p>{#}. {parent.name}'s kid - {name} - {bday:date("M/d/yyyy")}</p></tpl></tpl>
I thought the following would work:
<tpl for="kids" if="name=='D*'">
Thanks for any help.
Mer.
I'm having difficulty finding a way to use the XTemplate with a
string comparison. For instance, how would you adapt the following code
to search for any name beginning with D?
<p>Name: {name}</p>
<p>Company: {company}</p>
<p>Location: {location}</p>
<p>Salary: {income:currency}</p>
<p>Kids:</p>
<tpl for="kids" if="name=='Darrell Meyer'">
<tpl if="age > 1"><p>{#}. {parent.name}'s kid - {name} - {bday:date("M/d/yyyy")}</p></tpl></tpl>
I thought the following would work:
<tpl for="kids" if="name=='D*'">
Thanks for any help.
Mer.