Rvsjoen/tutorial/Developing an MVC Component/Part 10: Difference between revisions
From Joomla! Documentation
Created page with "= Adding decorations to the backend = We like pretty things, and decorations tend to make things pretty, so let us add some decorations to the backend views." |
No edit summary |
||
| Line 2: | Line 2: | ||
We like pretty things, and decorations tend to make things pretty, so let us add some decorations to the backend views. | We like pretty things, and decorations tend to make things pretty, so let us add some decorations to the backend views. | ||
== Installation manifest == | |||
The changes to the installation manifest are the version number and the addition of the <tt>controller</tt> folder in the administrator file copy section. | |||
<span id="helloworld.xml"> | |||
'''<tt>helloworld.xml</tt>''' | |||
<source lang="xml" line> | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<extension type="component" version="1.6.0" method="upgrade"> | |||
<name>COM_HELLOWORLD</name> | |||
<!-- The following elements are optional and free of formatting constraints --> | |||
<creationDate>June 2011</creationDate> | |||
<author>John Doe</author> | |||
<authorEmail>john.doe@example.org</authorEmail> | |||
<authorUrl>http://www.example.org</authorUrl> | |||
<copyright>Copyright Info</copyright> | |||
<license>License Info</license> | |||
<!-- The version string is stored in the components table --> | |||
<version>0.0.10</version> | |||
<!-- The description is optional and defaults to the name --> | |||
<description>COM_HELLOWORLD_DESCRIPTION</description> | |||
<install> | |||
<sql> | |||
<file driver="mysql" charset="utf8">sql/install.mysql.utf8.sql</file> | |||
</sql> | |||
</install> | |||
<uninstall> | |||
<sql> | |||
<file driver="mysql" charset="utf8">sql/uninstall.mysql.utf8.sql</file> | |||
</sql> | |||
</uninstall> | |||
<!-- Note the folder attribute: This attribute describes the folder | |||
to copy FROM in the package to install therefore files copied | |||
in this section are copied from "site/" in the package --> | |||
<files folder="site"> | |||
<filename>index.html</filename> | |||
<filename>helloworld.php</filename> | |||
<filename>controller.php</filename> | |||
<folder>views</folder> | |||
<folder>models</folder> | |||
<folder>language</folder> | |||
</files> | |||
<media destination="com_helloworld" folder="media"> | |||
<filename>index.html</filename> | |||
<folder>images</folder> | |||
</media> | |||
<administration> | |||
<menu img="../media/com_helloworld/images/tux-16x16.png">COM_HELLOWORLD_MENU</menu> | |||
<!-- Note the folder attribute: This attribute describes the folder | |||
to copy FROM in the package to install therefore files copied | |||
in this section are copied from "admin/" in the package --> | |||
<files folder="admin"> | |||
<filename>index.html</filename> | |||
<filename>helloworld.php</filename> | |||
<filename>controller.php</filename> | |||
<folder>sql</folder> | |||
<folder>tables</folder> | |||
<folder>models</folder> | |||
<folder>views</folder> | |||
<folder>language</folder> | |||
<folder>controllers</folder> | |||
</files> | |||
</administration> | |||
</extension> | |||
</source> | |||
</span> | |||
== Testing your component == | |||
For details on how to install the component into your Joomla! site, refer to the information provided in | |||
[[User:Rvsjoen/tutorial/Developing_an_MVC_Component/Part_01#Testing_your_component|Part 01]]. | |||
== File listing == | |||
* <tt>[[#helloworld.xml|helloworld.xml]]</tt> | |||
* <tt>[[User:Rvsjoen/tutorial/Developing_an_MVC_Component/Part_01#index.html|site/index.html]]</tt> | |||
* <tt>[[User:Rvsjoen/tutorial/Developing_an_MVC_Component/Part_02#site/helloworld.php|site/helloworld.php]]</tt> | |||
* <tt>[[User:Rvsjoen/tutorial/Developing_an_MVC_Component/Part_02#site/controller.php|site/controller.php]]</tt> | |||
* <tt>[[User:Rvsjoen/tutorial/Developing_an_MVC_Component/Part_01#index.html|site/views/index.html]]</tt> | |||
* <tt>[[User:Rvsjoen/tutorial/Developing_an_MVC_Component/Part_01#index.html|site/views/helloworld/index.html]]</tt> | |||
* <tt>[[User:Rvsjoen/tutorial/Developing_an_MVC_Component/Part_04#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]</tt> | |||
* <tt>[[User:Rvsjoen/tutorial/Developing_an_MVC_Component/Part_01#index.html|site/views/helloworld/tmpl/index.html]]</tt> | |||
* <tt>[[User:Rvsjoen/tutorial/Developing_an_MVC_Component/Part_02#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]</tt> | |||
* <tt>[[User:Rvsjoen/tutorial/Developing_an_MVC_Component/Part_06#site/views/helloworld/tmpl/default.xml|site/views/helloworld/tmpl/default.xml]]</tt> | |||
* <tt>[[User:Rvsjoen/tutorial/Developing_an_MVC_Component/Part_01#index.html|site/models/index.html]]</tt> | |||
* <tt>[[User:Rvsjoen/tutorial/Developing_an_MVC_Component/Part_06#site/models/helloworld.php|site/models/helloworld.php]]</tt> | |||
* <tt>[[User:Rvsjoen/tutorial/Developing_an_MVC_Component/Part_01#index.html|site/language/index.html]]</tt> | |||
* <tt>[[User:Rvsjoen/tutorial/Developing_an_MVC_Component/Part_01#index.html|site/language/en-GB/index.html]]</tt> | |||
* <tt>[[User:Rvsjoen/tutorial/Developing_an_MVC_Component/Part_08#site/language/en-GB/en-GB.com_helloworld.ini|site/language/en-GB/en-GB.com_helloworld.ini]]</tt> | |||
* <tt>[[User:Rvsjoen/tutorial/Developing_an_MVC_Component/Part_01#index.html|admin/index.html]]</tt> | |||
* <tt>[[User:Rvsjoen/tutorial/Developing_an_MVC_Component/Part_07#admin/helloworld.php|admin/helloworld.php]]</tt> | |||
* <tt>[[User:Rvsjoen/tutorial/Developing_an_MVC_Component/Part_07#admin/controller.php|admin/controller.php]]</tt> | |||
* <tt>[[User:Rvsjoen/tutorial/Developing_an_MVC_Component/Part_01#index.html|admin/controllers/index.html]]</tt> | |||
* <tt>[[#admin/controllers/helloworld.php|admin/controllers/helloworld.php]]</tt> | |||
* <tt>[[#admin/controllers/helloworlds.php|admin/controllers/helloworlds.php]]</tt> | |||
* <tt>[[User:Rvsjoen/tutorial/Developing_an_MVC_Component/Part_01#index.html|admin/models/index.html]]</tt> | |||
* <tt>[[#admin/models/helloworld.php|admin/models/helloworld.php]]</tt> | |||
* <tt>[[User:Rvsjoen/tutorial/Developing_an_MVC_Component/Part_07#admin/models/helloworlds.php|admin/models/helloworlds.php]]</tt> | |||
* <tt>[[User:Rvsjoen/tutorial/Developing_an_MVC_Component/Part_01#index.html|admin/models/fields/index.html]]</tt> | |||
* <tt>[[User:Rvsjoen/tutorial/Developing_an_MVC_Component/Part_06#admin/models/fields/helloworld.php|admin/models/fields/helloworld.php]]</tt> | |||
* <tt>[[User:Rvsjoen/tutorial/Developing_an_MVC_Component/Part_01#index.html|admin/models/forms/index.html]]</tt> | |||
* <tt>[[#admin/models/forms/helloworld.xml|admin/models/forms/helloworld.xml]]</tt> | |||
* <tt>[[User:Rvsjoen/tutorial/Developing_an_MVC_Component/Part_01#index.html|admin/views/index.html]]</tt> | |||
* <tt>[[User:Rvsjoen/tutorial/Developing_an_MVC_Component/Part_01#index.html|admin/views/helloworld/index.html]]</tt> | |||
* <tt>[[#admin/views/helloworld/view.html.php|admin/views/helloworld/view.html.php]]</tt> | |||
* <tt>[[User:Rvsjoen/tutorial/Developing_an_MVC_Component/Part_01#index.html|admin/views/helloworld/tmpl/index.html]]</tt> | |||
* <tt>[[#admin/views/helloworld/tmpl/edit.php|admin/views/helloworld/tmpl/edit.php]]</tt> | |||
* <tt>[[User:Rvsjoen/tutorial/Developing_an_MVC_Component/Part_01#index.html|admin/views/helloworlds/index.html]]</tt> | |||
* <tt>[[#admin/views/helloworlds/view.html.php|admin/views/helloworlds/view.html.php]]</tt> | |||
* <tt>[[User:Rvsjoen/tutorial/Developing_an_MVC_Component/Part_01#index.html|admin/views/helloworlds/tmpl/index.html]]</tt> | |||
* <tt>[[#admin/views/helloworlds/tmpl/default.php|admin/views/helloworlds/tmpl/default.php]]</tt> | |||
* <tt>[[User:Rvsjoen/tutorial/Developing_an_MVC_Component/Part_07#admin/views/helloworlds/tmpl/default_head.php|admin/views/helloworlds/tmpl/default_head.php]]</tt> | |||
* <tt>[[User:Rvsjoen/tutorial/Developing_an_MVC_Component/Part_07#admin/views/helloworlds/tmpl/default_body.php|admin/views/helloworlds/tmpl/default_body.php]]</tt> | |||
* <tt>[[User:Rvsjoen/tutorial/Developing_an_MVC_Component/Part_07#admin/views/helloworlds/tmpl/default_foot.php|admin/views/helloworlds/tmpl/default_foot.php]]</tt> | |||
* <tt>[[User:Rvsjoen/tutorial/Developing_an_MVC_Component/Part_01#index.html|admin/tables/index.html]]</tt> | |||
* <tt>[[User:Rvsjoen/tutorial/Developing_an_MVC_Component/Part_06#admin/tables/helloworld.php|admin/tables/helloworld.php]]</tt> | |||
* <tt>[[User:Rvsjoen/tutorial/Developing_an_MVC_Component/Part_01#index.html|admin/sql/index.html]]</tt> | |||
* <tt>[[User:Rvsjoen/tutorial/Developing_an_MVC_Component/Part_06#admin/sql/install.mysql.utf8.sql|admin/sql/install.mysql.utf8.sql]]</tt> | |||
* <tt>[[User:Rvsjoen/tutorial/Developing_an_MVC_Component/Part_06#admin/sql/uninstall.mysql.utf8.sql|admin/sql/uninstall.mysql.utf8.sql]]</tt> | |||
* <tt>[[User:Rvsjoen/tutorial/Developing_an_MVC_Component/Part_01#index.html|admin/language/index.html]]</tt> | |||
* <tt>[[User:Rvsjoen/tutorial/Developing_an_MVC_Component/Part_01#index.html|admin/language/en-GB/index.html]]</tt> | |||
* <tt>[[#admin/language/en-GB/en-GB.com_helloworld.ini|admin/language/en-GB/en-GB.com_helloworld.ini]]</tt> | |||
* <tt>[[User:Rvsjoen/tutorial/Developing_an_MVC_Component/Part_08#admin/language/en-GB/en-GB.com_helloworld.sys.ini|admin/language/en-GB/en-GB.com_helloworld.sys.ini]]</tt> | |||
== Download this part == | |||
== Articles in this series == | |||
{{:Chunks:Developing_an_MVC_Component_Contents}} | |||
[[Category:Development]] | |||
[[Category:Tutorials]] | |||
[[Category:Joomla! 1.6]] | |||
[[Category:Joomla! 1.7]] | |||
Revision as of 10:31, 12 July 2011
Adding decorations to the backend
We like pretty things, and decorations tend to make things pretty, so let us add some decorations to the backend views.
Installation manifest
The changes to the installation manifest are the version number and the addition of the controller folder in the administrator file copy section.
helloworld.xml
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="1.6.0" method="upgrade">
<name>COM_HELLOWORLD</name>
<!-- The following elements are optional and free of formatting constraints -->
<creationDate>June 2011</creationDate>
<author>John Doe</author>
<authorEmail>john.doe@example.org</authorEmail>
<authorUrl>http://www.example.org</authorUrl>
<copyright>Copyright Info</copyright>
<license>License Info</license>
<!-- The version string is stored in the components table -->
<version>0.0.10</version>
<!-- The description is optional and defaults to the name -->
<description>COM_HELLOWORLD_DESCRIPTION</description>
<install>
<sql>
<file driver="mysql" charset="utf8">sql/install.mysql.utf8.sql</file>
</sql>
</install>
<uninstall>
<sql>
<file driver="mysql" charset="utf8">sql/uninstall.mysql.utf8.sql</file>
</sql>
</uninstall>
<!-- Note the folder attribute: This attribute describes the folder
to copy FROM in the package to install therefore files copied
in this section are copied from "site/" in the package -->
<files folder="site">
<filename>index.html</filename>
<filename>helloworld.php</filename>
<filename>controller.php</filename>
<folder>views</folder>
<folder>models</folder>
<folder>language</folder>
</files>
<media destination="com_helloworld" folder="media">
<filename>index.html</filename>
<folder>images</folder>
</media>
<administration>
<menu img="../media/com_helloworld/images/tux-16x16.png">COM_HELLOWORLD_MENU</menu>
<!-- Note the folder attribute: This attribute describes the folder
to copy FROM in the package to install therefore files copied
in this section are copied from "admin/" in the package -->
<files folder="admin">
<filename>index.html</filename>
<filename>helloworld.php</filename>
<filename>controller.php</filename>
<folder>sql</folder>
<folder>tables</folder>
<folder>models</folder>
<folder>views</folder>
<folder>language</folder>
<folder>controllers</folder>
</files>
</administration>
</extension>
Testing your component
For details on how to install the component into your Joomla! site, refer to the information provided in Part 01.
File listing
- helloworld.xml
- site/index.html
- site/helloworld.php
- site/controller.php
- site/views/index.html
- site/views/helloworld/index.html
- site/views/helloworld/view.html.php
- site/views/helloworld/tmpl/index.html
- site/views/helloworld/tmpl/default.php
- site/views/helloworld/tmpl/default.xml
- site/models/index.html
- site/models/helloworld.php
- site/language/index.html
- site/language/en-GB/index.html
- site/language/en-GB/en-GB.com_helloworld.ini
- admin/index.html
- admin/helloworld.php
- admin/controller.php
- admin/controllers/index.html
- admin/controllers/helloworld.php
- admin/controllers/helloworlds.php
- admin/models/index.html
- admin/models/helloworld.php
- admin/models/helloworlds.php
- admin/models/fields/index.html
- admin/models/fields/helloworld.php
- admin/models/forms/index.html
- admin/models/forms/helloworld.xml
- admin/views/index.html
- admin/views/helloworld/index.html
- admin/views/helloworld/view.html.php
- admin/views/helloworld/tmpl/index.html
- admin/views/helloworld/tmpl/edit.php
- admin/views/helloworlds/index.html
- admin/views/helloworlds/view.html.php
- admin/views/helloworlds/tmpl/index.html
- admin/views/helloworlds/tmpl/default.php
- admin/views/helloworlds/tmpl/default_head.php
- admin/views/helloworlds/tmpl/default_body.php
- admin/views/helloworlds/tmpl/default_foot.php
- admin/tables/index.html
- admin/tables/helloworld.php
- admin/sql/index.html
- admin/sql/install.mysql.utf8.sql
- admin/sql/uninstall.mysql.utf8.sql
- admin/language/index.html
- admin/language/en-GB/index.html
- admin/language/en-GB/en-GB.com_helloworld.ini
- admin/language/en-GB/en-GB.com_helloworld.sys.ini
Download this part
Articles in this series
This tutorial is supported by the following versions of Joomla!
- Introduction
- Part 01 - Developing a Basic Component
- Part 02 - Adding a view to the frontend
- Part 03 - Adding a menu item type to the frontend
- Part 04 - Adding a model to the frontend
- Part 05 - Adding options to menu items
- Part 06 - Using a database
- Part 07 - Basic backend
- Part 08 - Adding language translation
- Part 09 - Adding actions to backend
- Part 10 - Adding decorations to the backend
- Part 11 - Adding validation
- Part 12 - Adding categories
- Part 13 - Adding component options
- Part 14 - Adding ACL
- Part 15 - Adding a script file