Joomla! employs a specific naming convention, which is used by all components. Each component in the system has a unique name with no spaces. The code is split into two folders, each bearing the component name prefixed by com_
. The component in this book will be called restaurants
. Therefore, you will have to create two folders named com_restaurants:
Create one in the folder named
components
, for the frontendCreate one in the folder named
components
within theadministrator
folder for the backend
When the component is loaded from the frontend, Joomla! will look for a file with the component's unique name ending in a .php
extension. Within the components/com_restaurants
folder, create a restaurants.php
file. Similarly, running it in the backend also assumes the presence of a file with the component name followed by .php
. Add the restaurants.php
file in administrator/components/ com_restaurants
folder. Leave both of the files empty for the moment.