Last active
August 29, 2015 14:15
-
-
Save mghdotdev/6bc47027c8710d939f39 to your computer and use it in GitHub Desktop.
MVT: Unique Array Item Checker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mvt:assign name="l.settings:searchcats[1]:code" value="'cat-1'" /> | |
<mvt:assign name="l.settings:searchcats[1]:name" value="'Category 1'" /> | |
<mvt:assign name="l.settings:searchcats[2]:code" value="'cat-2'" /> | |
<mvt:assign name="l.settings:searchcats[2]:name" value="'Category 2'" /> | |
<mvt:assign name="l.settings:searchcats[3]:code" value="'cat-3'" /> | |
<mvt:assign name="l.settings:searchcats[3]:name" value="'Category 3'" /> | |
<mvt:assign name="l.settings:searchcats[4]:code" value="'cat-1'" /> | |
<mvt:assign name="l.settings:searchcats[4]:name" value="'Category 1'" /> | |
<mvt:assign name="l.settings:searchcats[5]:code" value="'cat-5'" /> | |
<mvt:assign name="l.settings:searchcats[5]:name" value="'Category 5'" /> | |
<mvt:foreach iterator="cat" array="searchcats"> | |
<mvt:if expr="miva_array_find( l.settings:cat:code, g.past_cats, 1 )"> | |
<mvt:foreachcontinue /> | |
</mvt:if> | |
&mvt:cat:code;<br/> | |
<mvt:assign name="l.index" value="miva_array_insert( g.past_cats, l.settings:cat:code, -1 )" /> | |
</mvt:foreach> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment