Ejemplo n.º 1
0
 public function index()
 {
     if (Input::method() == 'POST') {
         if (Metadata::update()) {
             return Response::redirect($this->admin_url . '/metadata');
         }
     }
     // provide a list to set for our home page and posts page
     $pages = Pages::list_all(array('status' => 'published'));
     Template::render('metadata/index', array('pages' => $pages, 'metadata' => (object) Config::get('metadata')));
 }
Ejemplo n.º 2
0
function menu_items($params = array())
{
    if (!has_menu_items()) {
        return false;
    }
    if (($pages = IoC::resolve('menu')) === false) {
        $params['status'] = 'published';
        $pages = Pages::list_all($params);
        IoC::instance('menu', $pages, true);
    }
    if ($result = $pages->valid()) {
        // register single post
        IoC::instance('menu_item', $pages->current(), true);
        // move to next
        $pages->next();
    }
    return $result;
}
Ejemplo n.º 3
0
 public function index()
 {
     $pages = Pages::list_all();
     Template::render('pages/index', array('pages' => $pages));
 }