adding conditionals to restrict the smarty post array to not include certain values
authorAnthony Talarico <talarico@gaslightmedia.com>
Fri, 2 Jun 2017 19:00:13 +0000 (15:00 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Fri, 2 Jun 2017 19:00:13 +0000 (15:00 -0400)
needed to check to make sure that values were empty in the members list page search results
before filtering them out of the results

glm-member-db/views/front/members/list.html

index 57a5219..a77a824 100644 (file)
@@ -3,13 +3,14 @@
 <div class="trail-list-search-terms">
 Search Terms: 
 {foreach $smarty.request as $key=>$value}
-  {if $value[0]}
-   {if $key !== 'action' && $key !== 'submit' && $key !== 'categories'}
+   {if $key !== 'action' && $key !== 'submit' && $key !== 'categories' }
      {if $key !== 'textSearch'}
+        {if $value[0]}
          {if $key === 'regionUserSearch'}
               {$key = 'regions'}
-          {/if}
+         {/if}
          <span class="trail-search-term">[{$searchParams->$key->$value[0]->name}] </span>
+         {/if}
      {else}
           <span class="trail-search-term">[{$value}]</span>
     {/if}
@@ -24,7 +25,6 @@ Search Terms:
           {/if}
         {/foreach}
     {/if}
-   {/if}
 {/foreach}
 </div>