update query vars if they are provided to templating methods

parent a16bdc9e
......@@ -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() )
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment