Announcements
Browse announcements.
WEB SOLUTIONS
FOR A GROWING BUSINESS
For all of your online business needs.
Article ID: 64 Created on: 04/19/2009 12:00 am Modified on: 04/19/2009 11:56 pm
<title><?=$this->Page->Title?></title>
<meta name="title" content="<?=$this->Page['meta_title']?>" /> = Which pulls from your "Meta Title" underneath your Advanced Settings section within page creation or editing time.
<meta name="description" content="<?=$this->Page['meta_description']?>" />
<meta name="keywords" content="<?=$this->Page['meta_keywords']?>" />
<meta name="publisher" content="<?=$this->Site->Title?>" />
<meta name="generator" content="<?=$this->Name?>" />
<link rel="shortcut icon" href="<?=$this->Site->URL?>/images/favicon.ico" />
<link type="text/css" rel="stylesheet" href="<?=$this->Site->URL?>/css/main.css" media="screen" />
<link type="application/rss+xml" rel="alternate" title="<?=$this->Page->Title?> - RSS" href="<?=$this->Page->RequestURL?>?xml=1">
<script type="text/javascript" src="<?=$this->Site->URL?>/js/jquery.js"></script>
<?=$this->Page->Theme->Navigation?>
<?=$this->Page->Theme->Menu?>
<?=$this->Page->Content?>
<?=$this->Page->Copyright?>
As you see the above examples within a standard CCMS template system, you will note the following to help you better understand this concept:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
calling $this->Page->Theme['template_mame'] autoloads the template with the same filename
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
setting $this->Page->Theme['template_name'] = false; disables that template
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
setting $this->Page->Theme['template_name'] = "folder_name_here"; sets that template to load from a subfolder
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
$this->Page->Theme['template name'] can be accessed as $this->Page->Theme->template_name case insensitive
autoloads the template with the same filename from the current active theme folder**
$this->Request is a class holder for $_REQUEST, with it's own member functions (validation, etc)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
if $_REQUET['name_of_request'] is null or not set, it will be set to false in $this->Request['name_of_request']
$this->Session is a class holder for $_SESSION, with session management methods (close, save, etc)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Headers can be set like this example as below:
$this->Page->Headers[] = "HTTP/1.1 404 Not Found";
or
$this->Page->Headers['Status'] = "404 Not Found";
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Redirection:
the best way to redirect is $this->Redirect(url)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Sections:
Sections can be created on-the-fly. As an example:
$this->Sections->Manage = new Section("Manage");
and section items with:
$this->Sections->Manage->Modules = new Item("Modules");
How Helpfull was this article to you?
Rating: 0 / 5 (0 votes cast)There are no comments