|
Sep
10
|
|
|
A. The Basics This article requires PHP knowledge and some basic knowledge of the Joomla paradigm. We will name our component “mycomponent” First we must understand how Joomla makes the call to a component. Since Joomla is a one entry point framework, all calls go through index.php. the “option” parameter indicates what component gets called. In order for Joomla to find the component, there must be a folder called “com_mycomponent”, and the main component file should be called mycomponent.php *Mind the case sensitivity of LINUX based hostings* Joomla will give control to your component, and the output will be displayed in the template you set up in your site. Common practice is to use the “task” parameter to indicate witch action should the component do. Joomla reads as a standard this parameter. You can rely on it that $task, $option and $Itemid (will be discussed later) are initialized before the entry into the component So for the first step just create a folder /components/com_ mycomponent Create the file /components/com_ mycomponent/mycomponent.php And write this in it:
switch ($task) { So we got a first running component. B. Administration Backend Most components have also administration options – mostly configurations or statistics. Some get the needed data in admin, some have just a configuration. Regardless, question is how it’s done. All admin tasks will be processed through a file in /administrator/components/com_ mycomponent that you have to name admin.mycomponent.php
Powered by !JoomlaComment 3.26
3.26 Copyright (C) 2008 Compojoom.com / Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved." |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| < Prev | Next > |
|---|

