Using the Framework: Basics: Unterschied zwischen den Versionen
Tm (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
Tm (Diskussion | Beiträge) |
||
| Zeile 29: | Zeile 29: | ||
* '''config/master.php:''' Set the DOCTYPE. | * '''config/master.php:''' Set the DOCTYPE. | ||
* '''language/LANGUAGE/master_lang.php:''' Set charset, page-language and title. You can set for every language of your application different configurations. | |||
* '''config/master_components.php:''' Configure components for the <head>-section. | * '''config/master_components.php:''' Configure components for the <head>-section. | ||
* '''views/master/head.php:''' Static content for the <head>. | * '''views/master/head.php:''' Static content for the <head>. | ||
* '''views/master/bodystart.php:''' Static content at the beginning of <body>. | * '''views/master/bodystart.php:''' Static content at the beginning of <body>. | ||
* '''views/master/bodyend.php:''' Static content at the end of <body>. | * '''views/master/bodyend.php:''' Static content at the end of <body>. | ||
Here is a short overview of some functions and variables of the library you can use: | |||
* '''$this->master->disable() and $this->master->enable():''' Disable or enable master templating completely. | |||
* '''$this->master->config[]:''' This associative array contains all configuration variables from "master.php" and "master_lang.php". So you can dynamically modify all configuration values ("master_title" for example). | |||
* '''$this->master->add_head($content) , $this->master->add_bodystart($content) and $this->master->add_bodyend($content)''': to add dynamically content into the <head> and <body> from everywhere in your application. | |||
Read the full documentation of the master-template library here: [[Libraries: Master]] | Read the full documentation of the master-template library here: [[Libraries: Master]] | ||
Version vom 25. August 2012, 01:27 Uhr
MVC Approach
First of all you should learn to create a webpage. CodeCoupler use CodeIgniter as base. CodeIgniter is a web application framework using the Model-View-Controller approach, which allows separation between logic and presentation.
Here is a very quick "Hello World" example: Hello World
To understand the whole CodeIgniter framework you should read the very clear and thorough documentation here: http://codeigniter.com/user_guide/index.html
Master Template
In contrast to the basic CodeIgniter framework, every output of a controller will be surrounded by a master-template. The basic layout of the master template looks like this:
<!DOCTYPE ... />
<html ... >
<head>
<charset ... />
<title> ... </title>
</head>
<body>
[YOUR CONTROLLER OUTPUT]
</body>
</html>
Here is a short overview where you can configure the behaviour of the master-template:
- config/master.php: Set the DOCTYPE.
- language/LANGUAGE/master_lang.php: Set charset, page-language and title. You can set for every language of your application different configurations.
- config/master_components.php: Configure components for the <head>-section.
- views/master/head.php: Static content for the <head>.
- views/master/bodystart.php: Static content at the beginning of <body>.
- views/master/bodyend.php: Static content at the end of <body>.
Here is a short overview of some functions and variables of the library you can use:
- $this->master->disable() and $this->master->enable(): Disable or enable master templating completely.
- $this->master->config[]: This associative array contains all configuration variables from "master.php" and "master_lang.php". So you can dynamically modify all configuration values ("master_title" for example).
- $this->master->add_head($content) , $this->master->add_bodystart($content) and $this->master->add_bodyend($content): to add dynamically content into the <head> and <body> from everywhere in your application.
Read the full documentation of the master-template library here: Libraries: Master
Multilanguage Routing
- tbd -
Default Enabled Components
- tbd -
