...
 
Commits (2)
......@@ -69,6 +69,8 @@ class grund_theme
{
if ( ! $layout )
$layout = $this->the_query->get( 'layout' );
else
$this->the_query->set( 'layout', $layout );
get_template_part( 'layout/layout', $layout );
}
......@@ -79,15 +81,23 @@ class grund_theme
$view = $this->the_query->get( 'view' );
if ( $view == 'listing' || $this->the_query->is_archive() || $this->the_query->is_home() )
{
$this->the_query->set( 'view', 'listing' );
$this->listing();
}
else
{
$this->the_query->set( 'view', 'detail' );
$this->detail();
}
}
function listing( $listing = null )
{
if ( ! $listing )
$listing = $this->the_query->get( 'listing' );
else
$this->the_query->set( 'listing', $listing );
get_template_part( 'listing/listing', $listing );
}
......@@ -111,6 +121,8 @@ class grund_theme
if ( ! $listed )
$listed = $this->the_query->get( 'listed', $post->post_type );
else
$this->the_query->set( 'listed', $listed );
get_template_part( 'listed/listed', $listed );
}
......@@ -142,6 +154,8 @@ class grund_theme
if ( ! $detail )
$detail = $this->the_query->get( 'detail', $post->post_type );
else
$this->the_query->set( 'detail', $detail );
if ( $this->the_query->have_posts() )
{
......
<?
<?php
global $grund_theme;
?>
<article <?=$grund_theme->detail_class()?>>
......
......@@ -20,7 +20,7 @@ if ( is_active_sidebar( $sidebar ) )
<div>
<?php get_sidebar( $sidebar ) ?>
</div>
<?
<?php
get_footer();
}
else
......
<?
<?php
global $grund_theme;
?>
<article <?=$grund_theme->listed_class()?>>
......