Made sure the brand always shows up first on the list
authorLaury GvR <laury@gaslightmedia.com>
Mon, 10 Apr 2017 18:57:20 +0000 (14:57 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Mon, 10 Apr 2017 18:57:20 +0000 (14:57 -0400)
The brand was possibly not the first to be found as all categories
were looped through.

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

index 51d904d..22ebc5c 100644 (file)
                                         
                                     {assign var="foundBrand" value=0}
                                     {assign var="foundClass" value=0}
+                                    
                                     {foreach $member.categories as $category}
-                                        
                                         {if $foundBrand == 0}
                                             {if $category.parent_name|substr:0 eq "Brands"}
                                                 {$category.name}
                                                 {assign var="foundBrand" value=1}
                                             {/if}
                                         {/if}
+                                    {/foreach}
+                                    
+                                    {foreach $member.categories as $category}
+                                        
                                         {if $foundClass == 0}
                                             {if $category.parent_name|substr:0 eq "Housing Classes"}
                                                 {$category.name}