entity interior and landing now proper sections, interior-page section no longer...
authorLaury GvR <laury@gaslightmedia.com>
Thu, 27 Jul 2017 15:52:26 +0000 (11:52 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Thu, 27 Jul 2017 15:52:26 +0000 (11:52 -0400)
index.php
parts/section-interior.php [deleted file]
parts/template-interior.php [deleted file]
sections/entity-interior.php [new file with mode: 0644]
sections/entity-landing.php [new file with mode: 0644]
sections/interior-page UNUSED.php [new file with mode: 0644]
sections/interior-page.php [deleted file]

index e5e800c..b114f62 100644 (file)
--- a/index.php
+++ b/index.php
@@ -7,34 +7,38 @@
             <div class="off-canvas-wrapper-inner" data-off-canvas-wrapper>
                 <div class="off-canvas-content" data-off-canvas-content>
                     <?php
-                    
+
                     if (is_front_page()) {
-                        
                         include "sections/front-page-header.php";
                         include "sections/front-page.php";
-                    }
-                    if (is_home()) {
-                        include "sections/header.php";
-                        include "sections/blog-home.php";
-                    }
-                    if (is_archive()) {
-                        include "sections/header.php";
-                        include "sections/blog-archive.php";
-                    }
-                    if (is_single()) {
-                        include "sections/header.php";
-                        include "sections/blog-single.php";
-                    }
-                    if (is_search()) {
+                    } else {
                         include "sections/header.php";
-                        include "sections/search.php";
-                    }
-                    if (is_page() && !is_front_page()) {
-                        include "sections/header.php"; 
-                        include "sections/interior-page.php"; 
+                        if (is_home()) {
+                            include "sections/blog-home.php";
+                        }
+                        if (is_archive()) {
+                            include "sections/blog-archive.php";
+                        }
+                        if (is_single()) {
+                            include "sections/blog-single.php";
+                        }
+                        if (is_search()) {
+                            include "sections/search.php";
+                        }
+                        if (is_page() && !is_front_page()) {
+
+                            if(get_abs_parent()){
+                                // If I have an entity landing page as parent, I must be an entity interior page
+                                get_template_part('sections/entity-interior');
+                            } else {
+                                // If not, and I am clearly not frontpage (checked above), I must be an entity landing page
+                                get_template_part('sections/entity-landing');
+                            }
+                        }
                     }
-                    include "sections/footer.php";  
-                    include "sections/copyright.php";  
+
+                    include "sections/footer.php";
+                    include "sections/copyright.php";
                     ?>
                     <div class="js-off-canvas-exit"></div>
                 </div><!--/.off-canvas-content-->
diff --git a/parts/section-interior.php b/parts/section-interior.php
deleted file mode 100644 (file)
index 473f738..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<main class="page-inside">
-    <div id="content-wrapper">
-        <?php echo glm_get_header();?>
-         <?php $sidebar = get_field('sidebar'); ?>
-         <?php $template = get_page_template_slug($post->ID); ?>
-          <div class="row column">
-                <?php if(!is_front_page()) {
-                    if($template === 'sidebars.php'){
-                        get_template_part('parts/left-sidebar');
-                    }
-                    if($sidebar){
-                        echo "<div class=\"small-12 medium-8 large-6 columns\">";
-                    } else {
-                        echo "<div class=\"small-12 medium-8 large-9 columns\">";
-                    }
-                    if(function_exists('bcn_display') && !is_front_page())
-                    {
-                        echo "<div class=\"breadcrumbs\">";
-                        bcn_display();
-    //                            get_template_part('parts/share-this');
-                        echo "</div>";
-                    }
-                    get_template_part('parts/main-content');
-                    echo "</div>";
-
-                    if($sidebar && $template === 'sidebars.php'){
-                        echo "<div id='sidebar' class='small-12 medium-4 large-3 show-for-large columns'>";
-                            get_sidebar();
-                        echo "</div>";
-                    }
-                } ?>
-        </div>
-    </div>
-</main>
\ No newline at end of file
diff --git a/parts/template-interior.php b/parts/template-interior.php
deleted file mode 100644 (file)
index 72692df..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<main class="page-inside">
-    <div id="content-wrapper">
-        <?php echo glm_get_header();?>
-         <?php //$post_content = get_post($post->ID); ?>
-          <div class="row column">
-                    <?php if(!is_front_page()) {
-                        echo "<div class=\"small-12 columns\">";
-                            if(function_exists('bcn_display') && !is_front_page()) 
-                            {
-                                echo "<div class=\"breadcrumbs\">";
-                                bcn_display();
-    //                            get_template_part('parts/share-this');
-                                echo "</div>";
-                            }
-                            get_template_part('parts/main-content');
-                            get_template_part('parts/glm-blocks');
-                        echo "</div>";
-                    } ?>
-            <?php// } ?>
-        </div>
-    </div>
-</main>
\ No newline at end of file
diff --git a/sections/entity-interior.php b/sections/entity-interior.php
new file mode 100644 (file)
index 0000000..1920542
--- /dev/null
@@ -0,0 +1,34 @@
+<main class="page-inside entity-interior">
+    <div id="content-wrapper">
+        <?php echo glm_get_header();?>
+         <?php $sidebar = get_field('sidebar'); ?>
+         <?php $template = get_page_template_slug($post->ID); ?>
+          <div class="row column">
+                <?php if(!is_front_page()) {
+                    if($template === 'sidebars.php'){
+                        get_template_part('parts/left-sidebar');
+                    }
+                    if($sidebar){
+                        echo "<div class=\"small-12 medium-8 large-6 columns\">";
+                    } else {
+                        echo "<div class=\"small-12 medium-8 large-9 columns\">";
+                    }
+                    if(function_exists('bcn_display') && !is_front_page())
+                    {
+                        echo "<div class=\"breadcrumbs\">";
+                        bcn_display();
+    //                            get_template_part('parts/share-this');
+                        echo "</div>";
+                    }
+                    get_template_part('parts/main-content');
+                    echo "</div>";
+
+                    if($sidebar && $template === 'sidebars.php'){
+                        echo "<div id='sidebar' class='small-12 medium-4 large-3 show-for-large columns'>";
+                            get_sidebar();
+                        echo "</div>";
+                    }
+                } ?>
+        </div>
+    </div>
+</main>
\ No newline at end of file
diff --git a/sections/entity-landing.php b/sections/entity-landing.php
new file mode 100644 (file)
index 0000000..6907057
--- /dev/null
@@ -0,0 +1,22 @@
+<main class="page-inside entity-landing">
+    <div id="content-wrapper">
+        <?php echo glm_get_header();?>
+         <?php //$post_content = get_post($post->ID); ?>
+          <div class="row column">
+                    <?php if(!is_front_page()) {
+                        echo "<div class=\"small-12 columns\">";
+                            if(function_exists('bcn_display') && !is_front_page())
+                            {
+                                echo "<div class=\"breadcrumbs\">";
+                                bcn_display();
+    //                            get_template_part('parts/share-this');
+                                echo "</div>";
+                            }
+                            get_template_part('parts/main-content');
+                            get_template_part('parts/glm-blocks');
+                        echo "</div>";
+                    } ?>
+            <?php// } ?>
+        </div>
+    </div>
+</main>
\ No newline at end of file
diff --git a/sections/interior-page UNUSED.php b/sections/interior-page UNUSED.php
new file mode 100644 (file)
index 0000000..babe79b
--- /dev/null
@@ -0,0 +1,116 @@
+<div id="interior-header-area">
+
+</div>
+<?php if(get_abs_parent()){
+    get_template_part('parts/entity-interior');
+} else {
+    get_template_part('parts/entity-landing');
+}
+?>
+
+
+<!--        <div id="page-title" class="text-center">
+
+            <?php
+                //$glmAssociateMemberName = apply_filters('glm_get_member_data','name');
+                //$glmAssociateMemberSlug = apply_filters('glm_associate_member','member_slug');
+
+//                if (is_member()) {
+//                    echo "<h1>" . get_member_name() . "</h1>";
+//                } else {
+//                    echo "<h1>" . get_the_title() . "</h1>";
+//                }
+            ?>
+        </div> -->
+<!--  <?php //if (get_page_template_slug( $post->ID ) == "page-chamber") { ?>
+
+                <?php //$index_template = false; ?>
+                   <div id="sidebar" class="large-3 columns show-for-large">
+                        <?php //get_template_part('parts/chamber-sidebar-left'); ?>
+                     </div>
+                    <div id="chamber-content" class="small-12 large-9 columns">
+                        <?php //if(function_exists('bcn_display') && !is_front_page())
+                        //{
+//                            echo "<div class=\"breadcrumbs\">";
+//                            bcn_display();
+//                            get_template_part('parts/share-this');
+//                            echo "</div>";
+                        //} ?>
+                        <?php //get_template_part('parts/main-content'); ?>
+                     </div>
+
+                <?php //} else if(is_in_tree(MEMBERS_ONLY_ID)) { ?>
+                    <?php //get_template_part('sections/glm-members-only'); ?>
+                <?php //} else if (is_member()) { ?>
+                    <?php //if(!is_front_page()) {
+//                        echo "<div class=\"small-12 columns\"><br>";
+//                        get_template_part('parts/main-content');
+//                        echo "</div>";
+                    //} ?>
+                <?php //} else if (get_page_template_slug( $post->ID ) == "no-sidebar") { ?>
+                    <?php// if(!is_front_page()) {
+//                        echo "<div class=\"small-12 columns\">";
+//                        if(function_exists('bcn_display') && !is_front_page())
+//                        {
+//                            echo "<div class=\"breadcrumbs\">";
+//                            bcn_display();
+//                            get_template_part('parts/share-this');
+//                            echo "</div>";
+//                        }
+//                        get_template_part('parts/main-content');
+//                        echo "</div>";
+                    //} ?>
+                <!-- check for chamber page template -->
+                <?php //} else if (is_account_page() || is_cart() || is_checkout()) {
+
+                ?>
+
+<!--
+                    <div class="medium-3 columns show-for-medium-up shop-sidebar-wrapper">
+                        <?php //get_template_part("parts/shop-sidebar");?>
+                    </div>
+                    <div id="woo-quick-display" class="small-12 medium-9 columns">
+                        <div id="woo-quick-cart-icon" class="small-3 columns left">
+                            <div class="woo-quick-cart-image">
+                                <a href="<?php //echo $woocommerce->cart->get_cart_url(); ?>">
+                                    <img src="<?php //echo get_template_directory_uri(); ?>/assets/shopping-cart.png">
+                                </a>
+                                <a href="<?php //echo $woocommerce->cart->get_cart_url(); ?>">
+                                    <h3>view cart</h3>
+                                </a>
+                            </div>
+
+                        </div>
+                        <div id="woo-quick-cart-totals" class="small-5 columns">
+                            <p><?php //echo $woocommerce->cart->get_cart_total(); ?>
+                                for
+                                <?php //echo sprintf(_n('%d item', '%d items', $woocommerce->cart->cart_contents_count,
+                                        //'woothemes'), $woocommerce->cart->cart_contents_count);?>
+                            </p>
+                        </div>
+                        <div id="woo-quick-checkout" class="small-4 columns right">
+                            <?php
+//                                if (is_user_logged_in()) {
+//                                    echo '<a href="'. get_permalink(101) . '?customer-logout=true" class="button login_toggle">log out</a>';
+//                                }
+//                                elseif (!is_user_logged_in()) {
+//                                    echo '<a href="'. get_permalink(101) . '" class="button login_toggle">log in</a>';
+//                                }
+                            ?>
+                            <a href="<?php //echo get_permalink(100); ?>" class="button">checkout</a>
+                        </div>
+                    </div>
+-->
+<!--                    <div class="small-12 medium-9 columns main woo-tags">-->
+                    <?php
+                            /**
+                             * woocommerce_before_main_content hook
+                             *
+                             * @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content)
+                             * @hooked woocommerce_breadcrumb - 20
+                             */
+//                            get_template_part('parts/main-content');
+                    ?>
+
+                <!--    </div> --><!-- .main .woo-tags -->
+                <?php //} else { ?>
\ No newline at end of file
diff --git a/sections/interior-page.php b/sections/interior-page.php
deleted file mode 100644 (file)
index 8cbe1b9..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-<div id="interior-header-area">
-
-</div>
-<?php if(get_abs_parent()){
-    get_template_part('parts/section-interior');
-} else {
-    get_template_part('parts/template-interior');
-}
-?>
-
-
-<!--        <div id="page-title" class="text-center">
-
-            <?php
-                //$glmAssociateMemberName = apply_filters('glm_get_member_data','name');
-                //$glmAssociateMemberSlug = apply_filters('glm_associate_member','member_slug');
-
-//                if (is_member()) {
-//                    echo "<h1>" . get_member_name() . "</h1>";
-//                } else {
-//                    echo "<h1>" . get_the_title() . "</h1>";
-//                }
-            ?>
-        </div> -->
-<!--  <?php //if (get_page_template_slug( $post->ID ) == "page-chamber") { ?>
-
-                <?php //$index_template = false; ?>
-                   <div id="sidebar" class="large-3 columns show-for-large">
-                        <?php //get_template_part('parts/chamber-sidebar-left'); ?>
-                     </div>
-                    <div id="chamber-content" class="small-12 large-9 columns">
-                        <?php //if(function_exists('bcn_display') && !is_front_page())
-                        //{
-//                            echo "<div class=\"breadcrumbs\">";
-//                            bcn_display();
-//                            get_template_part('parts/share-this');
-//                            echo "</div>";
-                        //} ?>
-                        <?php //get_template_part('parts/main-content'); ?>
-                     </div>
-
-                <?php //} else if(is_in_tree(MEMBERS_ONLY_ID)) { ?>
-                    <?php //get_template_part('sections/glm-members-only'); ?>
-                <?php //} else if (is_member()) { ?>
-                    <?php //if(!is_front_page()) {
-//                        echo "<div class=\"small-12 columns\"><br>";
-//                        get_template_part('parts/main-content');
-//                        echo "</div>";
-                    //} ?>
-                <?php //} else if (get_page_template_slug( $post->ID ) == "no-sidebar") { ?>
-                    <?php// if(!is_front_page()) {
-//                        echo "<div class=\"small-12 columns\">";
-//                        if(function_exists('bcn_display') && !is_front_page())
-//                        {
-//                            echo "<div class=\"breadcrumbs\">";
-//                            bcn_display();
-//                            get_template_part('parts/share-this');
-//                            echo "</div>";
-//                        }
-//                        get_template_part('parts/main-content');
-//                        echo "</div>";
-                    //} ?>
-                <!-- check for chamber page template -->
-                <?php //} else if (is_account_page() || is_cart() || is_checkout()) {
-
-                ?>
-
-<!--
-                    <div class="medium-3 columns show-for-medium-up shop-sidebar-wrapper">
-                        <?php //get_template_part("parts/shop-sidebar");?>
-                    </div>
-                    <div id="woo-quick-display" class="small-12 medium-9 columns">
-                        <div id="woo-quick-cart-icon" class="small-3 columns left">
-                            <div class="woo-quick-cart-image">
-                                <a href="<?php //echo $woocommerce->cart->get_cart_url(); ?>">
-                                    <img src="<?php //echo get_template_directory_uri(); ?>/assets/shopping-cart.png">
-                                </a>
-                                <a href="<?php //echo $woocommerce->cart->get_cart_url(); ?>">
-                                    <h3>view cart</h3>
-                                </a>
-                            </div>
-
-                        </div>
-                        <div id="woo-quick-cart-totals" class="small-5 columns">
-                            <p><?php //echo $woocommerce->cart->get_cart_total(); ?>
-                                for
-                                <?php //echo sprintf(_n('%d item', '%d items', $woocommerce->cart->cart_contents_count,
-                                        //'woothemes'), $woocommerce->cart->cart_contents_count);?>
-                            </p>
-                        </div>
-                        <div id="woo-quick-checkout" class="small-4 columns right">
-                            <?php
-//                                if (is_user_logged_in()) {
-//                                    echo '<a href="'. get_permalink(101) . '?customer-logout=true" class="button login_toggle">log out</a>';
-//                                }
-//                                elseif (!is_user_logged_in()) {
-//                                    echo '<a href="'. get_permalink(101) . '" class="button login_toggle">log in</a>';
-//                                }
-                            ?>
-                            <a href="<?php //echo get_permalink(100); ?>" class="button">checkout</a>
-                        </div>
-                    </div>
--->
-<!--                    <div class="small-12 medium-9 columns main woo-tags">-->
-                    <?php
-                            /**
-                             * woocommerce_before_main_content hook
-                             *
-                             * @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content)
-                             * @hooked woocommerce_breadcrumb - 20
-                             */
-//                            get_template_part('parts/main-content');
-                    ?>
-
-                <!--    </div> --><!-- .main .woo-tags -->
-                <?php //} else { ?>
\ No newline at end of file