can’t use {if} condition
-
I am trying to loop out data from my json and I need to filter it by the department_id. I have tried using {if departments.department_id == 2} but without any result.
Is the if-tag doesn’t supported in this plugin?Here is my code I tried:
{subloop-array:departments:-1}
{if departments.department_id ==2}
<h1>{departments.name}</h1>
{subloop-array:departments.listings:-1}
<div class="className">
<h3>{title}</h3>
</div> {/subloop-array:departments.listings}
{/if}
{/subloop-array:departments}
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘can’t use {if} condition’ is closed to new replies.