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.1.x [2009/01/07 20:17] – bibo | en:tutorials:minitutorial:1.1.x [2009/01/07 21:43] – bibo | ||
---|---|---|---|
Line 8: | Line 8: | ||
First, [[en: | First, [[en: | ||
- | Then unpack the archive file you have downloaded, with your archiver software companion. For example, with tar: | + | Then, unpack the archive file you have downloaded, with your archiver software companion. For example, with tar: |
<code bash> | <code bash> | ||
Line 16: | Line 16: | ||
After this, you have a directory @@F@jelix-1.1/ | After this, you have a directory @@F@jelix-1.1/ | ||
- | For the purpose of this tutorial, move jelix-1.1 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.1 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 118: | Line 118: | ||
===== Implementing an action ===== | ===== Implementing an action ===== | ||
- | Let's implement a default action. An action is a process which generates a page. It is implemented as a method in a class called a " | + | Let's implement a default action. An action is a process which generates a page. It is implemented as a method in a class called a " |
+ | |||
+ | Open @@F@example/ | ||
<code php> | <code php> | ||
Line 135: | Line 137: | ||
</ | </ | ||
- | We state here that we retrieve | + | What this code means is that **index** action of **default** controller retrieves |
- | @@C@jResponseHtml@@ has a @@P@body@@ property, which is a @@C@jTpl@@ object. jTpl is a template engine provided by Jelix. In the controller, you see that the @@C@assignZone()@@ method | + | @@C@jResponseHtml@@ has a @@P@body@@ property, which is a @@C@jTpl@@ object. jTpl is a template engine provided by Jelix. |
+ | |||
+ | In the action code above, you see a call to @@C@assignZone()@@ method. | ||
<code php> | <code php> | ||
Line 153: | Line 157: | ||
==== Response object ==== | ==== Response object ==== | ||
- | The @@C@jResponseHtml@@ object generates | + | a @@C@jResponseHtml@@ object generates |
+ | |||
+ | Let's define the title of the page. Add this in the @@M@index()@@ method, | ||
<code php> | <code php> | ||
Line 159: | Line 165: | ||
</ | </ | ||
- | Reload the page. The title of the page is now display in your browser title bar. But the page contains this: | + | Reload the page. The page title should |
{{en: | {{en: |