Download demo controller and view files (core v8CMS files will not be included in the .zip file)
Note: this is the v8CMS title&URL add/edit menu; it can be placed anywhere so that it fits the design.
Home page options:
Add a page in site rootEdit page detailsAdd a sub-page

Home

The "Home", "Services", "Contact" and "About" pages are using the default v8CMS method and view. The default method is creating the array data to be passed to the view as the left-nav (Product categories). The view prints the content (if any) and lists the childs (if any). The childs are listed in alphabetical order since we are setting the default child ordering rule with the childs_order property in the v8cms_controller() method like this: $this->childs_order = 'z_index DESC,title ASC';.
Note: this text is added in the view file and it is not editable.

The default method looks like this:

public function default_method() {
$root_navigation = array();
$root_navigation = $this->root_navigation();
$side_nav = array();
$side_nav = $this->products_side_nav();
$this->v8cms->editor();
$this->v8cms->data = array_merge($this->v8cms->data,$root_navigation,$side_nav);
}


The view gets from v8CMS the data (like title, content, childs, parents and any other field from the MySQL structure table we might add in the future) about the item as the $item array. We are also sending the "Product categories" for the left-nav.

The products_side_nav() is creating an array to be passed to the view using this basic command: $data['products'] = $this->v8cms->item_data(array('id'=>2,'order_by'=>'title ASC'));. v8cms::item_data() is the most important v8CMS method and here we are reading the data about the item with the ID=2 (Products) and order it's childs by name (title field), ascending.

About v8CMS

v8CMS 3.0 is a Web Content Management System and a solid Website development platform based on the parent-child structure.

The Concept

A Web Content Management System should obviously give the developer a platform to build a website on; that platform should have the minimum functionality required so that the end-user can edit the content of a page, add sub-pages (or childs) to a page and remove one or more pages. There are many content management systems out there, however the v8CMS is not yet another CMS; it is a model that can be applied to any website, from a small 5 page website to complex websites that can have custom pages for products, services and news, each of these module being governed by the same model. It is a small & simple script and yet a big solution that can be extended to large and complex websites.