Additions:
codarba
Additions:
5) Displaying data data in the view
===Displaying data data in the view===
After the controller has provided the view with the data, the view can display the data. In our case after the ArticleController has been executed a variable article is known to the view, which matches the article node.
The programming of the views is done in HTML together with the Smarty template language. The file article.tpl could contain the following line:
article name: {$nodeUtil->getInputControl($article, "name")}
In the curly brackets you can find Smarty code, which calls the method NodeUtil::getInputControl. This method displays the input control (in our case a textfield), which corresponds to the article's name attribute, in the HTML page. In the same manner the other attributes can be handled.
Deletions:
5) [[DisplayingData data in the view]]
Additions:
5) [[DisplayingData data in the view]]
Deletions:
5) Displaying data in the view
===Displaying data in the view===
After the controller has provided the view with the data, the view can display the data. In our case after the ArticleController has been executed a variable article is known to the view, which matches the article node.
The programming of the views is done in HTML together with the Smarty template language. The file article.tpl could contain the following line:
article name: {$nodeUtil->getInputControl($article, "name")}
In the curly brackets you can find Smarty code, which calls the method NodeUtil::getInputControl. This method displays the input control (in our case a textfield), which corresponds to the article's name attribute, in the HTML page. In the same manner the other attributes can be handled.
Revision [60]
The oldest known version of this page was created on
2007-03-03 10:12:48 by GiuseppePlatania
[added from framework doc]