1 <?php
defined('IN_CMS') or die('No direct access allowed.');
3 class Metadata_controller
{
5 public function __construct() {
6 $this->admin_url
= Config
::get('application.admin_folder');
9 public function index() {
10 if(Input
::method() == 'POST') {
11 if(Metadata
::update()) {
12 return Response
::redirect($this->admin_url
. '/metadata');
16 // provide a list to set for our home page and posts page
17 $pages = Pages
::list_all(array('status' => 'published'));
20 $themes = Themes
::list_all();
22 Template
::render('metadata/index', array(
25 'metadata' => (object) Config
::get('metadata')