Trace:
Differences ¶
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
en:tutorials:minitutorial:1.2.x [2011/02/28 11:59] – ilon | en:tutorials:minitutorial:1.2.x [2011/02/28 15:35] – ilon | ||
---|---|---|---|
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 16: | Line 16: | ||
After this, you have a directory @@F@jelix-1.2.x.x-dev/ | After this, you have a directory @@F@jelix-1.2.x.x-dev/ | ||
- | For the purpose of this tutorial, move jelix-1.2.x.x-dev folder in a directory of your web site. So that it will be accessible with a browser, at this URL for example: @@http:// | + | For the purpose of this tutorial, move jelix-1.2.x.x-dev folder in a directory of your web site. So that it will be accessible with a browser, at this URL for example: @@http:// |
===== Jelix scripts ===== | ===== Jelix scripts ===== | ||
Line 23: | Line 23: | ||
<code bash> | <code bash> | ||
- | cd lib/ | + | |
- | cd lib\jelix-scripts\ | + | |
</ | </ | ||
Line 103: | Line 103: | ||
</ | </ | ||
- | You are now ready for prime. Your application is accessible at this URL: @@http:// | + | You are now ready for prime. Your application is accessible at this URL: @@http:// |
{{en: | {{en: | ||
- | Noticed this message saying that a CSS file is missing ? Copy the @@F@jelix-1.1/ | + | Noticed this message saying that a CSS file is missing ? Copy the @@F@jelix/ |
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-> | ||
} | } | ||
} | } | ||
- | |||
</ | </ | ||
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 304: | Line 371: | ||
Now type: | Now type: | ||
- | http:// | + | http:// |
You will see: | You will see: | ||
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 ===== |