Skip to content

Instantly share code, notes, and snippets.

@ringmaster
Created May 8, 2012 19:49
Show Gist options
  • Save ringmaster/2638823 to your computer and use it in GitHub Desktop.
Save ringmaster/2638823 to your computer and use it in GitHub Desktop.
/**
* Helper function: Displays the home page
* @param array $user_filters Additional arguments used to get the page content
*/
public function act_display_home( $user_filters = array() )
{
$paramarray['fallback'] = array(
'home',
'multiple',
);
// Makes sure home displays only entries
$default_filters = array(
'content_type' => Post::type( 'entry' ),
// ADD ADDITIONAL CONDITIONS HERE
);
$paramarray['user_filters'] = array_merge( $default_filters, $user_filters );
return $this->act_display( $paramarray );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment