adding php code to get array of page urls for each of the regions
authorAnthony Talarico <talarico@gaslightmedia.com>
Thu, 11 Aug 2016 14:23:59 +0000 (10:23 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Thu, 11 Aug 2016 14:23:59 +0000 (10:23 -0400)
front-page.php
parts/community-map-svg.php
parts/community-map.php

index 1bd0d7b..22c31b1 100644 (file)
         </div>
     </div>
 <?php get_footer(); ?>
-    
-<?php 
-    $args = array(
-    'post_type' => 'page',
-    'post__in' => array(276,275,274,273,983,981,985),
-    'posts_per_page' => -1, 
-    'numberposts' => -1
-//    'post__in' => array(69,71,73,75, 77, 79)
-);
-
-$posts = get_posts($args);
-
-foreach ($posts as $p){
-    $sites[$p->ID] = get_permalink($p->ID);
-}
-    $js_sites = json_encode($sites);
-?>
-    
-<script type="text/javascript">
-    imageMapResize();
-    var site_array = <?php echo $js_sites ?>;
-    var id;
-    
-    function get_id(el){
-//        console.log(el.getAttribute("data-id"));
-        id = el.getAttribute("data-id"); 
-        window.location.href = site_array[el.getAttribute("data-id")];
-//        console.log(site_array[el.getAttribute("data-id")]);
-    }
-    
-</script>
index 3a0d944..6a464f9 100644 (file)
        c0,6.876,5.342,12.49,12.1,12.955V77.2h52.677v-0.008C300.392,77.104,306.126,71.324,306.126,64.2z"/>
 <text data-id="983" class="region-hover-text content-shape" transform="matrix(1 0 0 1 240.7426 67.919)" fill="#FFFFFF" font-family="'OpenSans-Bold'" font-size="13.19px">Alanson</text>
 </svg>
+          
+          
            
\ No newline at end of file
index 2317cc1..eaec7bd 100644 (file)
@@ -76,7 +76,7 @@ foreach ($nav_posts as $p){
         console.log(site_array);
         $(region).on("click", function (){
             window.location.href = site_array[$(this).attr("data-id")];
-    //        window.location.href = 'https://www.google.com';
+//            window.location.href = 'https://www.google.com';
         });
     });