Quick links: Content - sections - sub sections
EN

Trace: 1.7.x 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:main:creating-action [2008/11/19 15:02] – external edit 127.0.0.1en:tutorials:main:creating-action [2012/04/15 08:32] (current) laurent
Line 1: Line 1:
-====== Creating an action ====== 
- 
- 
- 
 ===== A little bit of theory ===== ===== A little bit of theory =====
  
Line 68: Line 64:
 </code> </code>
  
-All the body of the page, i.e the content of the html tag <body>, must be generated by yourself, eventually through the Jelix template engine : [[en:manual-1.0:templates|jTpl]]. jResponseHtml instantiates by default a template engine, in the **body** property. The name of the template file is placed in the **bodyTpl** property.+All the body of the page, i.e the content of the html tag <body>, must be generated by yourself, eventually through the Jelix template engine : [[http://docs.jelix.org/en/manual-1.0/templates|jTpl]]. jResponseHtml instantiates by default a template engine, in the **body** property. The name of the template file is placed in the **bodyTpl** property.
  
 Before beginning to code, let's see the content of the template. Before beginning to code, let's see the content of the template.
Line 101: Line 97:
 </code> </code>
  
-We added an instruction to specify to the response that we use the newslist.tpl template.  There is no need to type the ".tpl" suffix of the file name, because it is actually a Jelix [[en:manual-1.0:selectors|selector]]. A [[en:manual-1.0:selectors|selector]] is a string, allowing to easily indicate a resource of the project, independently of its physical place.+We added an instruction to specify to the response that we use the newslist.tpl template.  There is no need to type the ".tpl" suffix of the file name, because it is actually a Jelix [[http://docs.jelix.org/en/manual-1.0/selectors|selector]]. A [[http://docs.jelix.org/en/manual-1.0/selectors|selector]] is a string, allowing to easily indicate a resource of the project, independently of its physical place.
  
-A selector comprise a module name and a resource name separated by the "~" character, like this: "module_name~resource_name". The "module_name~" part is not mandatory when this is the current module. The resource name is not obligatorily a file name, even if, most of the time, it is a file name. The object which uses the selector ([[en:manual-1.0:templates|jTpl]] here) knows how to retrieve the file corresponding to the selector. You will see that the selectors are very often used and allow a certain flexibility and independence from physical paths.+A selector comprise a module name and a resource name separated by the "~" character, like this: "module_name~resource_name". The "module_name~" part is not mandatory when this is the current module. The resource name is not obligatorily a file name, even if, most of the time, it is a file name. The object which uses the selector ([[http://docs.jelix.org/en/manual-1.0/templates|jTpl]] here) knows how to retrieve the file corresponding to the selector. You will see that the selectors are very often used and allow a certain flexibility and independence from physical paths.
  
 ===== First  display ===== ===== First  display =====
Line 126: Line 122:
   http://localhost/jelix/news.org/www/index.php   http://localhost/jelix/news.org/www/index.php
  
- 
----- 
-   * Next : [[en:tutorials:main:database-config|Configuration of the database]] 
-   * Previous : [[en:tutorials:main:creating-application|Application creation]] 
-   * [[en:tutorials:main|Back to the summary]] 

en/tutorials/main/creating-action.1227106958.txt.gz · Last modified: 2008/11/19 21:42 (external edit)

Recent changes RSS feed Creative Commons License