This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision |
en:tutorials:minitutorial:1.1.x [2009/01/07 21:43] – bibo | en:tutorials:minitutorial:1.1.x [2009/01/07 21:50] – bibo |
---|
</code> | </code> |
| |
Reload the page. The page title should now correctly display in your browser title bar. But still your page contains this: | Reload the page. The page title should now display accordingly in your browser title bar. But still your page contains this: |
| |
{{en:tutorials:minitutorial:minituto_1_en.png}} | {{en:tutorials:minitutorial:minituto_1_en.png}} |
| |
How is this possible although we don't have anything in our controller ? | How is this possible whereas we don't define any content in our controller ? |
| |
We saw that @@M@getResponse('html')@@ returns a @@C@jResponseHtml@@ object. However, it is possible to return an other object for the "html" type. It can be an other object which inherits from @@C@jResponseHtml@@, and which set things which are common for all actions. For example: CSS style sheets, the main template etc. This is very useful because you don't need to repeat this settings in your actions. And because this is very useful, the @@createapp@@ command creates a such class and a default template. This sort of classes are stored in the @@F@responses/@@ directory of the application, and are declared in the configuration file. | We have seen before that @@M@getResponse('html')@@ returns a @@C@jResponseHtml@@ object. However, it could return another object for the "html" type. It could be an instance of a class inheriting from @@C@jResponseHtml@@ and which set common things for all 'html' actions. Think about defining common CSS style sheets and JS scripts, your application main template etc. This class is very useful as you don't need to repeat this settings through all your actions. And because this is very useful, the @@createapp@@ command creates such a class and a default template. it is stored in the @@F@responses/@@ directory of your application, and is declared in the configuration file. |
| |
Let's see the content of @@F@example/responses/myHtmlResponse.class.php@@ created by @@createapp@@: | Let's see the content of @@F@example/responses/myHtmlResponse.class.php@@ created by @@createapp@@: |