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:06] – doubleface | en:minitutorial [2006/11/08 11:04] – (old revision restored) 127.0.0.1 | ||
---|---|---|---|
Line 89: | Line 89: | ||
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 106: | Line 107: | ||
</ | </ | ||
- | We don't put the " | + | We don't put the " |
+ | |||
+ | |||
+ | ==== The template ==== | ||
+ | |||
+ | Create a hello.tpl file in the template directory of the module. And put in this content : | ||
+ | |||
+ | <code xml> | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | " | ||
+ | |||
+ | <code php> | ||
+ | $rep-> | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | ==== As a summary ==== | ||
+ | The code of the controller must now be like this : | ||
+ | |||
+ | <code php> | ||
+ | class CTDefault extends jController { | ||
+ | |||
+ | | ||
+ | $rep = $this-> | ||
+ | $rep-> | ||
+ | |||
+ | $rep-> | ||
+ | $rep-> | ||
+ | |||
+ | return $rep; | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | ===== 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: | ||