File: D:/HostingSpaces/yoda-ict/yoda-ict.nl/wwwroot/app/controllers/c_service_detail.class.php
<?php
/**
* c_services.class.php
* Created by Komma Mediadesign.
* Author: mike
* Date: 11/02/14
*/
class Service_Detail extends Controller
{
public function __construct()
{
parent::__construct();
}
/*
* Index of the home page
*/
public function index()
{
// Title
$title = str_replace('-',' ',URL_PAGE);
$title = ucwords($title);
if(strtolower($title) == 'vds hosting') $title = 'VDS Hosting';
$this->View->setData('page_title', $title . ' | ' . SITE_NAME);
// Set view to load
$view = str_replace('-','_',URL_PAGE);
// Load template view
if($view == 'webhosting')
{
// Also render submenu
$this->View->render(array('services/v_menu','services/v_submenu','services/v_' . $view));
}
else{
$this->View->render(array('services/v_menu','services/v_' . $view));
}
}
/*
* Sub page
*/
public function service_sub()
{
if(defined('URL_SUB'))
{
// Title
$title = str_replace('-',' ',URL_PAGE);
$title = ucwords($title);
// Sub Title
$subTitle = str_replace('-',' ',URL_SUB);
$subTitle = ucwords($subTitle);
if(strtolower($subTitle) == 'kentico cms') $subTitle = 'Kentico CMS';
$this->View->setData('page_title', $subTitle . ' | ' . $title . ' | ' . SITE_NAME);
// Set view to load
$view = str_replace('-','_',URL_SUB);
// Load template view
$this->View->render(array('services/v_menu','services/v_submenu','services/v_' . $view));
}
}
}