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:minitutorial [2006/09/18 11:12] – doubleface | en:minitutorial [2006/12/15 21:06] – laurent | ||
---|---|---|---|
Line 9: | Line 9: | ||
After that, open a console and go to the lib/ | After that, open a console and go to the lib/ | ||
- | under linux : | + | <code bash> |
- | under windows : cd lib\jelix-scripts\ | + | cd lib/ |
+ | cd lib\jelix-scripts\ | ||
+ | </ | ||
This directory contains a script, jelix.php, which can make easy the creation and modification of different files of an application based on Jelix. You have to use it with the command line version of PHP and give it as parameter a Jelix command with some other parameters and options. | This directory contains a script, jelix.php, which can make easy the creation and modification of different files of an application based on Jelix. You have to use it with the command line version of PHP and give it as parameter a Jelix command with some other parameters and options. | ||
Line 21: | Line 23: | ||
<code bash> | <code bash> | ||
- | export JELIX_APP_NAME=helloapp | + | export JELIX_APP_NAME=helloapp |
- | set JELIX_APP_NAME=helloapp | + | set JELIX_APP_NAME=helloapp |
</ | </ | ||
- | |||
Line 35: | Line 36: | ||
</ | </ | ||
- | You will then get a helloapp/ directory, at the same level as the lib/ directory. | + | You will then get a helloapp/ directory, at the same level as the lib/ directory. |
helloapp/ | helloapp/ | ||
Line 43: | Line 44: | ||
| | ||
| | ||
- | | + | |
| | ||
Line 78: | Line 79: | ||
<code php> | <code php> | ||
- | class CTDefault | + | class defaultCtrl |
| | ||
Line 89: | Line 90: | ||
We state here that we retrieve the jResponseHtml object (because of the HTML type as it is indicated), and we return it to indicate that its content must be returned to the browser. | We state here that we retrieve the jResponseHtml object (because of the HTML type as it is indicated), and we return it to indicate that its content must be returned to the browser. | ||
- | |||
- | |||
Line 101: | Line 100: | ||
</ | </ | ||
- | The body of the page is generated by default | + | The body of the page is generated by default |
<code php> | <code php> | ||
Line 124: | Line 123: | ||
$rep-> | $rep-> | ||
</ | </ | ||
+ | |||
Line 130: | Line 130: | ||
<code php> | <code php> | ||
- | class CTDefault | + | class defaultCtrl |
| | ||
Line 143: | Line 143: | ||
} | } | ||
</ | </ | ||
+ | |||
+ | |||
+ | |||
+ | ===== First display ===== | ||
+ | |||
+ | We are now ready to display our page. For this, give the following URL : | ||
+ | http:// | ||
+ | |||
+ | You will then see your html page, with the welcome message. | ||
+ | |||
+ | The url can change regarding the configuration of your installation, | ||
+ | |||
+ | |||
+ | |||
+ | ===== Retrieving parameters ===== | ||
+ | |||
+ | It would be interesting to be able to indicate as parameter of the url, the name to display in the template. | ||
+ | |||
+ | <code php> | ||
+ | $name = $this-> | ||
+ | | ||
+ | </ | ||
+ | |||
+ | Now type : | ||
+ | http:// | ||
+ | |||
+ | ----- | ||
+ | * Go back to the [[en: | ||
+ | * Continue to discover Jelix with the [[en: | ||