Skip to content

Instantly share code, notes, and snippets.

@daveWid
Created April 19, 2011 19:50
Show Gist options
  • Save daveWid/929437 to your computer and use it in GitHub Desktop.
Save daveWid/929437 to your computer and use it in GitHub Desktop.
A Demo theme "controller" for the Arid Wordpress plugin
<?php defined('ARID') or die('Please enable the Arid plugin!');
// Get the page information
$page = new Page(get_body_class());
// Get the template ready
$template = View::factory('template');
$template->set(array(
// Title
'title' => $page->title,
// Page content
'content' => View::factory($page->view)->set((array) $page),
// CSS
'styles' => array(
get_stylesheet_uri() => "screen"
),
// JS
'scripts' => array(
"http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"
),
));
echo $template;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment