Exemple #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'));
     // list valid themes
     $themes = Themes::list_all();
     Template::render('metadata/index', array('pages' => $pages, 'themes' => $themes, 'metadata' => (object) Config::get('metadata')));
 }
Exemple #2
0
<?php

// get themes
require PATH . 'classes/themes' . EXT;
$themes = Themes::list_all();
?>

<hgroup role="banner">
	<h1>Marketplace</h1>
	<a href="/themes/submit">Submit your theme</a>
</hgroup>

<section>

	<ul class="submissions">
		<?php 
foreach ($themes as $key => $theme) {
    ?>
		<li>
			<figure>
				<a class="img" href="/themes/view/<?php 
    echo $key;
    ?>
">
					<img src="/submissions/<?php 
    echo $key;
    ?>
/preview.png">
				</a>
				<figcaption>
					<h2><a href="/themes/view/<?php