Quick links: Content - sections - sub sections
EN

Trace:

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.1.x [2009/01/07 21:50] biboen:tutorials:minitutorial:1.1.x [2012/04/15 08:36] (current) laurent
Line 6: Line 6:
 ===== Download and installation ===== ===== Download and installation =====
  
-First, [[en:download:stable:1.1#developer-edition|download the "developer" edition of Jelix]]. Jelix requires at least PHP 5.2 (See [[en:manual-1.1:installation:requirements|here a detailed list of requirements]])+First, [[en:download:stable:1.1#developer-edition|download the "developer" edition of Jelix]]. Jelix requires at least PHP 5.2 (See [[http://docs.jelix.org/en/manual-1.1/installation/requirements|here a detailed list of requirements]])
  
 Then, unpack the archive file you have downloaded, with your archiver software companion. For example, with tar: Then, unpack the archive file you have downloaded, with your archiver software companion. For example, with tar:
Line 178: Line 178:
 class myHtmlResponse extends jResponseHtml { class myHtmlResponse extends jResponseHtml {
  
-    public $bodyTpl = 'exemple~main';+    public $bodyTpl = 'example~main';
  
     protected function doAfterActions() {     protected function doAfterActions() {
Line 186: Line 186:
 </code> </code>
  
-This "customized" response set up in @@P@bodyTpl@@ the default template which will be used to generate the @@<body>@@ content of all pages : "exemple~main". This is the @@F@main.tpl@@ file in the example module. "exemple~main" is called a selector. A [[en:manual-1.1:selectors|Jelix selector]] is a shortcut to refer to a resource of a module. Here is the content of this template:+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.1/selectors|Jelix selector]] is a shortcut to refer to a resource of a module. Here is the content of main.tpl:
  
 <code html> <code html>
-   <h1 class="apptitle">example<br/><span class="welcome">{@jelix~jelix.newapp.h1@}</span></h1>+   <h1 class="apptitle">Title for example<br/><span class="welcome">{@jelix~jelix.newapp.h1@}</span></h1>
    {$MAIN}    {$MAIN}
 </code> </code>
Line 195: Line 195:
 @@{$MAIN}@@ is an instruction which says: display the content of the template variable named @@V@MAIN@@. {@jelix~jelix.newapp.h1@} is an instruction which says: display the localized string (a string which value depends on the lang) identified by the "jelix.newapp.h1" key and stored in the "jelix" module. @@{$MAIN}@@ is an instruction which says: display the content of the template variable named @@V@MAIN@@. {@jelix~jelix.newapp.h1@} is an instruction which says: display the localized string (a string which value depends on the lang) identified by the "jelix.newapp.h1" key and stored in the "jelix" module.
  
-The method @@M@doAfterActions@@ is called after each action. In the example, it assigns @@"<p>no content</p>"@@ to the MAIN template variable if this variable doesn't exist yet  (so, if it is not set by the action).+@@M@doAfterActions@@ method is called after each action. In the example, it assigns @@"<p>no content</p>"@@ to the MAIN template variable if this variable doesn't exist yet  (so, if it is not set by the action).
  
 Now you know why there is a content displaying on the start page. Now let's modify the template with this content: Now you know why there is a content displaying on the start page. Now let's modify the template with this content:

en/tutorials/minitutorial/1.1.x.txt · Last modified: 2012/04/15 08:36 by laurent

Recent changes RSS feed Creative Commons License