I am writing my first Joomla component, on Joomla 3.3.0, following the book Learning Joomla! 3 Extension Development, Third Edition.
I am following the author's advice and writing code directly under Jommla's folders, such as \administrator\components\com_coup
, where com_coup
is my component for a coupon management system. I have a full folder structure, and at the end of a chapter the author says I should have a certain folder and file structure, and am ready for installation by Discovery, Joomla finds my component in Site
and Administration
, and installing the admin one seems to go well, but no menu item is inserted into the Components
menu.
Should I be discovering two components, why is my menu item not inserted. My `coup.xml' file contains the line:
<administration>
<menu img="class:categories">COM_COUP_MENU</menu>
and the text item COM_COUP_MENU
exists in the language\en-GB\en-GB.com_coup.sys.ini
file.
My coup.xml
file is:
<?xml version ="1.0" encoding ="utf-8"?>
<extension type="component" version="3.0" method="upgrade">
<name>com_coup</name>
<author>Brady Kelly</author>
<creationDate>2014-06-14</creationDate>
<copyright>(C) Erisia Web Development. All rights reserved.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<authorEmail>brady@bradykelly.net</authorEmail>
<authorUrl>http://thepraxis.co.za/</authorUrl>
<version>1.0.0</version>
<description>COM_COUP_XML_DESCRIPTION</description>
<scriptfile>script.php</scriptfile>
<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>
<files folder="site">
<filename>index.html</filename>
</files>
<administration>
<menu img="class:categories">COM_COUP_MENU</menu>
<files folder="admin">
<filename>index.html</filename>
<filename>access.xml</filename>
<filename>config.xml</filename>
<filename>controller.php</filename>
<filename>coup.php</filename>
<folder>controllers</folder>
<folder>helpers</folder>
<folder>models</folder>
<folder>sql</folder>
<folder>tables</folder>
<folder>views</folder>
</files>
<languages folder="admin">
<language tag="en-GB">language/en-GB/en-GB.com_coup.ini</language>
<language tag="en-GB">language/en-GB/en-GB.com_coup.sys.ini</language>
</languages>
</administration>
</extension>
and my en-GB.com_coup.sys.ini
file is:
COM_COUP="Coup"
COM_COUP_XML_DESCRIPTION="The winning voucher and coupon manager!"
COM_COUP_MENU="Voucher Coup"