Универсальная база знаний LMS Wisdom System Wisdom Tree MAIN My Profile

Inside how to add new pages

by #Alex Torrison
Add new pages in any controller like controller methods: www.site.com/controller/method/
https://www.codeigniter.com/userguide3/general/routing.html

Or you can Create NEW Controller in /controllers/:

?php if (!defined('BASEPATH')) exit('No direct script access allowed');

class Page extends Controller_Base {

public $__load_default = true;

public function demo() {

$this->data['page_center'] = 'demo_page';
$this->data['seo_title'] = 'Page Name';
$this->data['seo_description'] = '';
$this->data['seo_keywords'] = '';

$this->__render();
}

}

$this->data['page_center'] = 'demo_page'; this is filename in /views/outside/pages/$filename

Also you can add demo_page_head and demo_page_footer for headers and footer scripts

$this->data is array which transform in simple variables in View!

Этот объект часть других / Parent