Quick links: Content - sections - sub sections
EN

Trace: 1.1rc1 1.4 1.2 end 1.2.x 1.2 hall-of-fame 1.3 1.0 manuale-1.1

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:tutorials:minitutorial:1.2.x [2011/02/28 12:48] ilonen:tutorials:minitutorial:1.2.x [2012/04/15 08:37] (current) laurent
Line 6: Line 6:
 ===== Download and installation ===== ===== Download and installation =====
  
-First, [[en:download:stable:1.2#developer-edition|download the "developer" edition of Jelix]]. Jelix requires at least PHP 5.2 (See [[en:manual-1.2:installation:requirements|here a detailed list of requirements]])+First, [[en:download:stable:1.2#developer-edition|download the "developer" edition of Jelix]]. Jelix requires at least PHP 5.2 (See [[http://docs.jelix.org/en/manual-1.2/installation/requirements|here a detailed list of requirements]])
  
 Unpack the archive file you have downloaded, with your archiver software companion. For example, with tar (replace x with you'r version): Unpack the archive file you have downloaded, with your archiver software companion. For example, with tar (replace x with you'r version):
Line 111: Line 111:
 Now you should see: Now you should see:
  
-{{en:tutorials:minitutorial:start_page_en.png}}+{{:en:tutorials:minitutorial:start_page_en-1.2.png?500}}
  
 If there are some error messages in the "installation check" section, fix them. If there are some error messages in the "installation check" section, fix them.
Line 229: Line 229:
 </code> </code>
  
-This "customized" response assigns to its @@P@bodyTpl@@ member the default template which will be used to generate the @@<body>@@ content of all pages : "example~main". This is the @@F@main.tpl@@ file in the example module. "example~main" is called a selector. A [[en:manual-1.2:selectors|Jelix selector]] is a shortcut to refer to a resource of a module. Here is the content of @@F@example/module/example/templates/main.tpl@@:+This "customized" response assigns to its @@P@bodyTpl@@ member the default template which will be used to generate the @@<body>@@ content of all pages : "example~main". This is the @@F@main.tpl@@ file in the example module. "example~main" is called a selector. A [[http://docs.jelix.org/en/manual-1.2/selectors|Jelix selector]] is a shortcut to refer to a resource of a module. Here is the content of @@F@example/module/example/templates/main.tpl@@:
  
 <code html> <code html>
Line 287: Line 287:
 Now you see: Now you see:
  
-{{en:tutorials:minitutorial:minituto_2_en.png}}+{{:en:tutorials:minitutorial:minituto_2_en-1.2.png|}}
  
 ==== Your first content ==== ==== Your first content ====
Line 296: Line 296:
  
 <code php> <code php>
 +/**
 +* @package   example
 +* @subpackage example
 +* @author    yourname
 +* @copyright 2010 yourname
 +* @link      http://www.yourwebsite.undefined
 +* @license    All right reserved
 +*/
 + 
 class defaultCtrl extends jController { class defaultCtrl extends jController {
 +   /** 
 +   * 
 +   */
    function index () {    function index () {
       $rep = $this->getResponse('html');       $rep = $this->getResponse('html');
Line 311: Line 322:
 So here, we put "<p>Hello !</p>" in the "MAIN" template variable. We now see: So here, we put "<p>Hello !</p>" in the "MAIN" template variable. We now see:
  
-{{en:tutorials:minitutorial:minituto_3_en.png}}+{{:en:tutorials:minitutorial:minituto_3_en-1.2.png|}}
  
  
Line 348: Line 359:
 You see now: You see now:
  
-{{en:tutorials:minitutorial:minituto_4_en.png}}+{{:en:tutorials:minitutorial:minituto_4_en-1.2.png|}}
  
 ===== Retrieving parameters ===== ===== Retrieving parameters =====
Line 360: Line 371:
  
 Now type: Now type:
-    http://localhost/jelix-1.1/example/www/index.php?name=Max+    http://localhost/jelix/example/www/index.php?name=Max
  
 You will see: You will see:
  
-{{en:tutorials:minitutorial:minituto_5_en.png}}+{{:en:tutorials:minitutorial:minituto_5_en-1.2.png|}}
  
  
Line 371: Line 382:
 To execute a specific action, you should add in the url  the module name, the controller name, and the method name of the action. For our example, we can type: To execute a specific action, you should add in the url  the module name, the controller name, and the method name of the action. For our example, we can type:
  
-   http://localhost/jelix-1.1/example/www/index.php/example/default/index+   http://localhost/jelix/example/www/index.php/example/default/index
  
 If it doesn't work, perhaps your server is not configured to accept pathinfo. You can then configure it or activating the "simple" url engine in the configuration of the application, and then type: If it doesn't work, perhaps your server is not configured to accept pathinfo. You can then configure it or activating the "simple" url engine in the configuration of the application, and then type:
  
-   http://localhost/jelix-1.1/example/www/index.php?module=example&action=default:index+   http://localhost/jelix/example/www/index.php?module=example&action=default:index
  
 See the manual for details. See the manual for details.
Line 389: Line 400:
 You can change it later if you want. You can change it later if you want.
  
-You can also change the "DocumentRoot" of the web site and to set it to the  @@F@jelix-1.1/exemple/www@@ directory, or move the content of the @@F@example/www@@ to the root of your web site.+You can also change the "DocumentRoot" of the web site and to set it to the  @@F@jelix/exemple/www@@ directory, or move the content of the @@F@example/www@@ to the root of your web site.
  
 ===== Conclusion ===== ===== Conclusion =====

en/tutorials/minitutorial/1.2.x.1298897305.txt.gz · Last modified: 2011/02/28 12:48 by ilon

Recent changes RSS feed Creative Commons License