Prev | Current Page 100 | Next

James Kennard

"Mastering Joomla! 1.5 Extension and Framework Development"

How we
choose to implement them is entirely up to us.
Chapter 4
[ 75 ]
Building a View
Views are separated by folders; each view has its own folder located in the views
folder. Within a view's folder we define a different file for each different document
type that the view is going to support i.e. feed, HTML, PDF, and RAW. If we are
defining a view for the HTML document type, we will also need to create a folder
called tmpl, which will hold layouts (HTML templates) to render the view.
Before we start building a view class, we need to determine the name of the class.
To make the MVC work as intended, we follow a special naming convention: the
component's name, the word 'View', and the view name. The view class is stored in a
file named view.documentType.php.
Imagine we are creating an HTML view for the component 'My Extension' to view
the entity foobar. The view class would be called MyextensionViewFoobar and it
would be located in a file called view.html.php in the views folder in a subfolder
called foobar.


Pages:
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
boiler service london dieta light pozycjonowanie portal pozycjonowanie