Using the Framework: Basics: Unterschied zwischen den Versionen
Tm (Diskussion | Beiträge) |
Tm (Diskussion | Beiträge) |
||
| Zeile 23: | Zeile 23: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Now open the url <nowiki>"http://<yourdomain>/test"</nowiki>. You will see your first webpage created with this framework. | |||
To understand the whole CodeIgniter framework you should read the very clear and thorough documentation here: http://codeigniter.com/user_guide/index.html | One of the relevant differendes between CodeCoupler and CodeIgniter ist, that you do not have to write a complete html-structure. CodeCoupler will do it for you. 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 == | == Master Template == | ||
Version vom 24. Juni 2013, 15:06 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. To "write" a page you need at least a controller and a view. Here a little "Hello World" example:
First of all create a file named test.php in the folder application/controllers/ with the following code:
<?php
class Test extends CI_Controller {
public function index()
{
$this->load->view('test');
}
}Then create a file named test.php in the folder application/views/ with the following code:
<h1>Hello World!</h1>
Now open the url "http://<yourdomain>/test". You will see your first webpage created with this framework.
One of the relevant differendes between CodeCoupler and CodeIgniter ist, that you do not have to write a complete html-structure. CodeCoupler will do it for you. 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>
Read the full documentation of the master-template library here: Libraries: Master
Multilanguage Routing
- tbd -
Default Enabled Components
- tbd -
