-<div id="categoriesView" class="row">
-
+<?php if(!isset($_COOKIE['catView']) || $_COOKIE['catView'] == "grid"){ ?>
+<div id="categoriesGridView" class="row">
<?php
if ( isset( $taxonomy_terms) && is_array( $taxonomy_terms ) ) :
foreach ( $taxonomy_terms as $term ) : ?>
endif; ?>
</div>
+<?php } ?>
+<?php if(!isset($_COOKIE['catView']) || $_COOKIE['catView'] == "list"){ ?>
+<div id="categoriesListView" class="row">
+<?php
+ if ( isset( $taxonomy_terms) && is_array( $taxonomy_terms ) ) :
+ foreach ( $taxonomy_terms as $term ) : ?>
+ <?php if (function_exists('z_taxonomy_image')) z_taxonomy_image(); ?>
+ <pre><?php //echo print_r( $term, true ) ?></pre>
+
+ <div class="small-12 columns<?php if ($term->end){ echo ' end';}?>">
+ <div class="row">
+ <div id="catContainer" class= "small-12 columns"><a href="<?php echo $term->href; ?>">
+ <div id="catImgContainer" class="small-12 medium-4 columns">
+ <img id="catImg" src="<?php echo z_taxonomy_image_url($term->term_id, 'thumbnail'); ?>" class="image wp-post-image no-display" alt="<?php echo $term->name; ?>" title="<?php echo $term->name; ?>" itemprop="image">
+ </div>
+ <?php echo $term->description ?></a>
+ <div id="catTitle" class="small-12 medium-4 columns">
+ <a href="<?php echo $term->href; ?>"> <?php echo $term->name; ?> </a>
+ </div>
+ <div id="padding" class="small-12 medium-4 columns">
+
+ </div>
+ </div>
+
+ </div>
+ </div>
+ <?php
+ endforeach;
+ endif; ?>
+
+</div>
+<?php } ?>
\ No newline at end of file