library/Controller/BaseController.php
public function layout()
    {
        $this->data['layout']['content']  = 'grid-xs-12 order-xs-1 order-md-2';
        $this->data['layout']['sidebarLeft'] = 'grid-xs-12 grid-md-4 grid-lg-3 order-xs-2 order-md-1';
        $this->data['layout']['sidebarRight'] = 'grid-xs-12 grid-md-4 grid-lg-3 hidden-xs hidden-sm hidden-md order-md-3';

        $sidebarLeft = false;
        $sidebarRight = false;

        if (get_field('archive_' . sanitize_title(get_post_type()) . '_show_sidebar_navigation', 'option') && is_post_type_archive(get_post_type())) {
            $sidebarLeft = true;
        }

        //Has child or is parent and nav_sub is enabled
        if (get_field('nav_sub_enable', 'option') && is_singular() &&
            !empty(get_children(['post_parent' => get_queried_object_id(), 'numberposts' => 1], ARRAY_A))
            || get_field('nav_sub_enable', 'option') && is_singular() &&
            count(get_children(['post_parent' => get_queried_object_id(), 'numberposts' => 1], ARRAY_A)) > 0) {
            $sidebarLeft = true;
        }

        if (is_active_sidebar('left-sidebar') || is_active_sidebar('left-sidebar-bottom')) {
            $sidebarLeft = true;
        }

        if (is_active_sidebar('right-sidebar')) {
            $sidebarRight = true;
        }

        if ($sidebarLeft && $sidebarRight) {
            $this->data['layout']['content']  = 'grid-xs-12 grid-md-8 grid-lg-6 order-xs-1 order-md-2';
        } elseif ($sidebarLeft || $sidebarRight) {
            $this->data['layout']['content']  = 'grid-xs-12 grid-md-8 grid-lg-9 order-xs-1 order-md-2';
        }

        if (!$sidebarLeft && $sidebarRight) {
            $this->data['layout']['sidebarLeft'] .= ' hidden-lg';
        }

        if (is_front_page()) {
            $this->data['layout']['content']  = 'grid-xs-12';
        }

        $this->data['layout'] = apply_filters('Municipio/Controller/BaseController/Layout', $this->data['layout'], $sidebarLeft, $sidebarRight);
    }
public function layout()
    {
        $this->data['layout']['content']  = 'grid-xs-12 order-xs-1 order-md-2';
        $this->data['layout']['sidebarLeft'] = 'grid-xs-12 grid-md-4 grid-lg-3 order-xs-2 order-md-1';
        $this->data['layout']['sidebarRight'] = 'grid-xs-12 grid-md-4 grid-lg-3 hidden-xs hidden-sm hidden-md order-md-3';

        $sidebarLeft = false;
        $sidebarRight = false;

        if (get_field('archive_' . sanitize_title(get_post_type()) . '_show_sidebar_navigation', 'option') && is_post_type_archive(get_post_type())) {
            $sidebarLeft = true;
        }

        //Has child or is parent and nav_sub is enabled
        if (get_field('nav_sub_enable', 'option') && is_singular() &&
            !empty(get_children(['post_parent' => get_queried_object_id(), 'numberposts' => 1], ARRAY_A))
            || get_field('nav_sub_enable', 'option') && is_singular() &&
            count(get_children(['post_parent' => get_queried_object_id(), 'numberposts' => 1], ARRAY_A)) > 0) {
            $sidebarLeft = true;
        }

        if (is_active_sidebar('left-sidebar') || is_active_sidebar('left-sidebar-bottom')) {
            $sidebarLeft = true;
        }

        if (is_active_sidebar('right-sidebar')) {
            $sidebarRight = true;
        }

        if ($sidebarLeft && $sidebarRight) {
            $this->data['layout']['content']  = 'grid-xs-12 grid-md-8 grid-lg-6 order-xs-1 order-md-2';
        } elseif ($sidebarLeft || $sidebarRight) {
            $this->data['layout']['content']  = 'grid-xs-12 grid-md-8 grid-lg-9 order-xs-1 order-md-2';
        }

        if (!$sidebarLeft && $sidebarRight) {
            $this->data['layout']['sidebarLeft'] .= ' hidden-lg';
        }

        if (is_front_page()) {
            $this->data['layout']['content']  = 'grid-xs-12';
        }

        $this->data['layout'] = apply_filters('Municipio/Controller/BaseController/Layout', $this->data['layout'], $sidebarLeft, $sidebarRight);
    }
public function layout ( ) { $ this -> data [ 'layout' ] [ 'content' ] = 'grid-xs-12 order-xs-1 order-md-2' ; $ this -> data [ 'layout' ] [ 'sidebarLeft' ] = 'grid-xs-12 grid-md-4 grid-lg-3 order-xs-2 order-md-1' ; $ this -> data [ 'layout' ] [ 'sidebarRight' ] = 'grid-xs-12 grid-md-4 grid-lg-3 hidden-xs hidden-sm hidden-md order-md-3' ; $ sidebarLeft = false ; $ sidebarRight = false ; if ( get_field ( 'archive_' . sanitize_title ( get_post_type ( ) ) . '_show_sidebar_navigation' , 'option' ) && is_post_type_archive ( get_post_type ( ) ) ) { $ sidebarLeft = true ; } //Has child or is parent and nav_sub is enabled if ( get_field ( 'nav_sub_enable' , 'option' ) && is_singular ( ) && ! empty ( get_children ( [ 'post_parent' => get_queried_object_id ( ) , 'numberposts' => 1 ] , ARRAY_A ) ) || get_field ( 'nav_sub_enable' , 'option' ) && is_singular ( ) && count ( get_children ( [ 'post_parent' => get_queried_object_id ( ) , 'numberposts' => 1 ] , ARRAY_A ) ) > 0 ) { $ sidebarLeft = true ; } if ( is_active_sidebar ( 'left-sidebar' ) || is_active_sidebar ( 'left-sidebar-bottom' ) ) { $ sidebarLeft = true ; } if ( is_active_sidebar ( 'right-sidebar' ) ) { $ sidebarRight = true ; } if ( $ sidebarLeft && $ sidebarRight ) { $ this -> data [ 'layout' ] [ 'content' ] = 'grid-xs-12 grid-md-8 grid-lg-6 order-xs-1 order-md-2' ; } elseif ( $ sidebarLeft || $ sidebarRight ) { $ this -> data [ 'layout' ] [ 'content' ] = 'grid-xs-12 grid-md-8 grid-lg-9 order-xs-1 order-md-2' ; } if ( ! $ sidebarLeft && $ sidebarRight ) { $ this -> data [ 'layout' ] [ 'sidebarLeft' ] .= ' hidden-lg' ; } if ( is_front_page ( ) ) { $ this -> data [ 'layout' ] [ 'content' ] = 'grid-xs-12' ; } $ this -> data [ 'layout' ] = apply_filters ( 'Municipio/Controller/BaseController/Layout' , $ this -> data [ 'layout' ] , $ sidebarLeft , $ sidebarRight ) ; }
Set main layout columns
@return void
Set main layout columns