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'); }
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(); } }
<?php echo Ionize::partial()->view('common/header'); ?> <?php echo $content_block; ?> <?php echo Ionize::partial()->view('common/footer');
/** * Ionize constructor */ public function __construct() { self::$instance = $this; $this->theme = Ionize\Theme::getInstance(); }