2
{{if production_country != null || production_year != null}}
    <h3 class="heading">Details</h3>
    <p><b>${production_country} ${production_year}</b>, {{html roles}}</p>
{{/if}}

How can i create a OR statement. This doesnt works in my jquery template..

Michael Unterthurner
  • 921
  • 1
  • 10
  • 25
  • I have 2 variables 'production year' and the 'production country'. When one of this variables is empty, i don't wanna show the headline with the paragraph. How i do that in the if statement in my jquery template? It always show a error when im using the pipe '||' – Michael Unterthurner Jun 21 '13 at 17:42

1 Answers1

0

Instead of:

{{if production_country != null || production_year != null}}

Use:

{{if production_country !="" OR production_year !=""}}

I am unsure from your question if you need to determine the values of production_country and production_year. eg production_year.value!=""

see this question:

jQuery: checking if the value of a field is null (empty)

Community
  • 1
  • 1