Trace:
Differences ¶
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:tutorials:minitutorial:1.2.x [2011/02/28 12:18] – ilon | en:tutorials:minitutorial:1.2.x [2012/04/15 08:37] (current) – laurent | ||
|---|---|---|---|
| Line 6: | Line 6: | ||
| ===== Download and installation ===== | ===== Download and installation ===== | ||
| - | First, [[en: | + | First, [[en: |
| 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: | + | {{:en: |
| If there are some error messages in the " | If there are some error messages in the " | ||
| Line 123: | Line 123: | ||
| <code php> | <code php> | ||
| - | class defaultCtrl extends jController { | + | /** |
| + | * @package | ||
| + | * @subpackage example | ||
| + | * @author | ||
| + | * @copyright 2010 yourname | ||
| + | * @link http:// | ||
| + | * @license | ||
| + | */ | ||
| + | class defaultCtrl extends jController { | ||
| + | /** | ||
| + | * | ||
| + | */ | ||
| | | ||
| $rep = $this-> | $rep = $this-> | ||
| Line 145: | Line 156: | ||
| <code php> | <code php> | ||
| - | class defaultCtrl extends jController { | + | /** |
| + | * @package | ||
| + | * @subpackage example | ||
| + | * @author | ||
| + | * @copyright 2010 yourname | ||
| + | * @link http:// | ||
| + | * @license | ||
| + | */ | ||
| + | class defaultCtrl extends jController { | ||
| + | /** | ||
| + | * | ||
| + | */ | ||
| | | ||
| $rep = $this-> | $rep = $this-> | ||
| Line 176: | Line 198: | ||
| <code php> | <code php> | ||
| + | /** | ||
| + | * @package | ||
| + | * @subpackage | ||
| + | * @author | ||
| + | * @copyright 2010 yourname | ||
| + | * @link http:// | ||
| + | * @license | ||
| + | */ | ||
| + | |||
| + | |||
| + | require_once (JELIX_LIB_CORE_PATH.' | ||
| + | |||
| class myHtmlResponse extends jResponseHtml { | class myHtmlResponse extends jResponseHtml { | ||
| public $bodyTpl = ' | public $bodyTpl = ' | ||
| + | |||
| + | function __construct() { | ||
| + | parent:: | ||
| + | |||
| + | // Include your common CSS and JS files here | ||
| + | } | ||
| protected function doAfterActions() { | protected function doAfterActions() { | ||
| + | // Include all process in common for all actions, like the settings of the | ||
| + | // main template, the settings of the response etc.. | ||
| + | |||
| $this-> | $this-> | ||
| } | } | ||
| Line 186: | Line 229: | ||
| </ | </ | ||
| - | This " | + | This " |
| <code html> | <code html> | ||
| Line 210: | Line 253: | ||
| <code php> | <code php> | ||
| + | /** | ||
| + | * @package | ||
| + | * @subpackage | ||
| + | * @author | ||
| + | * @copyright 2010 yourname | ||
| + | * @link http:// | ||
| + | * @license | ||
| + | */ | ||
| + | |||
| + | |||
| + | require_once (JELIX_LIB_CORE_PATH.' | ||
| + | |||
| class myHtmlResponse extends jResponseHtml { | class myHtmlResponse extends jResponseHtml { | ||
| + | |||
| public $bodyTpl = ' | public $bodyTpl = ' | ||
| - | + | ||
| - | | + | function __construct() { |
| parent:: | parent:: | ||
| global $gJConfig; | global $gJConfig; | ||
| - | $this-> | + | $this-> |
| + | // Include your common CSS and JS files here | ||
| } | } | ||
| + | |||
| protected function doAfterActions() { | protected function doAfterActions() { | ||
| + | // Include all process in common for all actions, like the settings of the | ||
| + | // main template, the settings of the response etc.. | ||
| + | |||
| $this-> | $this-> | ||
| } | } | ||
| } | } | ||
| - | |||
| </ | </ | ||
| Now you see: | Now you see: | ||
| - | {{en: | + | {{:en: |
| ==== Your first content ==== | ==== Your first content ==== | ||
| Line 240: | Line 296: | ||
| <code php> | <code php> | ||
| + | /** | ||
| + | * @package | ||
| + | * @subpackage example | ||
| + | * @author | ||
| + | * @copyright 2010 yourname | ||
| + | * @link http:// | ||
| + | * @license | ||
| + | */ | ||
| + | |||
| class defaultCtrl extends jController { | class defaultCtrl extends jController { | ||
| + | /** | ||
| + | * | ||
| + | */ | ||
| | | ||
| $rep = $this-> | $rep = $this-> | ||
| Line 255: | Line 322: | ||
| So here, we put "< | So here, we put "< | ||
| - | {{en: | + | {{:en: |
| Line 292: | Line 359: | ||
| You see now: | You see now: | ||
| - | {{en: | + | {{:en: |
| ===== Retrieving parameters ===== | ===== Retrieving parameters ===== | ||
| Line 304: | Line 371: | ||
| Now type: | Now type: | ||
| - | http:// | + | http:// |
| You will see: | You will see: | ||
| - | {{en: | + | {{:en: |
| Line 315: | 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: | ||
| - | | + | |
| If it doesn' | If it doesn' | ||
| - | | + | |
| See the manual for details. | See the manual for details. | ||
| Line 333: | Line 400: | ||
| You can change it later if you want. | You can change it later if you want. | ||
| - | You can also change the " | + | You can also change the " |
| ===== Conclusion ===== | ===== Conclusion ===== | ||

