I have a grid field type that is working correctly without any issuse. What i am trying to do is create an if statment basied on the search criteria of the grid search.
What I have:
<div class="twelve columns">
{courses search:course_type="Foundation" search:degree_type="Masters" search:applies_to = "<?php echo $degreeName ?>"}
<div class="more-button white course-list-title">
{courses:course_number} {courses:course_title}
</div>
<div class="course-list-content">
<p>{courses:course_content} </p>
</div>
{/courses}
</div>
The code above works fine. What I want to do is create an if statment basied on the number of rows, that only returns one thing regardless if there are rows or not.
Something like this:
{if courses:total_rows > 0 search:course_type="Foundation" search:degree_type="Masters" search:applies_to = "<?php echo $degreeName ?>" }
Some Code
{if:else}
Some Other Code
{/if}