예제 #1
0
 public function __construct($attributes = NULL, $parent = NULL)
 {
     $ionize = \Ionize::getInstance();
     Debug($ionize, '$ionize');
     if (count($ionize->contents) > 0) {
         $this->output = TRUE;
     }
     foreach ($ionize->contents as $content) {
         $this->addItem(new Article($content));
     }
     Info(get_class() . ' Initialized');
 }
예제 #2
0
파일: Output.php 프로젝트: adamos42/ionize
 public function render()
 {
     // Get instance of the urls handler class
     $this->urls = Model\Data\Urls\Urls::getInstance();
     // Get the related contents from the URL and language
     $url = $this->urls->setBaseURL($this->base_url)->setLanguage($this->language)->getByURL($this->url_string);
     if ($url->id_url != NULL) {
         // Get instance of the contents handler class
         $this->contents = Model\Data\Contents\Contents::getInstance();
         // Get the related contents from the URL and language
         $content = $this->contents->setLanguage($this->language)->getByID($url->id_content);
         // Load Theme handler class
         $ionize = Ionize::getInstance();
         // Add conttents data to the Ionize
         $ionize->setContent($content);
         // Render the webpage
         $output = $ionize->render();
         Debug($output, '$output');
         // Set the output
         $this->output->set_output($output);
     } else {
         show_404();
     }
 }
예제 #3
0
파일: default.php 프로젝트: adamos42/ionize
<?php

echo Ionize::partial()->view('common/header');
?>

<?php 
echo $content_block;
?>

<?php 
echo Ionize::partial()->view('common/footer');
예제 #4
0
파일: Ionize.php 프로젝트: adamos42/ionize
 /**
  * Ionize constructor
  */
 public function __construct()
 {
     self::$instance = $this;
     $this->theme = Ionize\Theme::getInstance();
 }