Modules and Components Introduction in Joomla! 2.5


Published on

This presentation covers a basic introduction of modules and components in Joomla!

Published in: Technology
1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • Hi, I am Vishwash Gaur. Today, I am going to present a beginner series webinar on the topic of Component and Module development in Joomla 2.5
  • There would be an added benefit if you have downloaded, installed and used Joomla! a little bit in prior.In reducing the procedural code issues i.e. lack of code reusability, higher debugging time and more
  • Modules typically makeup the elements of sidebar or content menus. Module complements the content contained in a component; they are not intended to be main sub-stance of the page.Modules are installed through the admin panel, they don’t manipulate any data from the database all what they do is display the contents on the page like examples on the page.
  • Module folder is located inside the modules directory of either front end or backend as per the case of development.
  • Components frequently have sophisticated back-end controls. The back-end is commonly used to create and manage the records from database. In Joomla, Content manager and Banner manager are examples of a component.Convention: Decide structure of component before development i.e. for front end, back end or both – it would allow you easy programming reference during the development.
  • Modules and Components Introduction in Joomla! 2.5

    1. 1. Vishwash Gaur © 2012 Vishwash Gaur. All rights reserved.All registered trademarks, logos, products and service names belong to their respective owners. Image Credit: Images used on this slide are for representative purposes only and belong to their respective owners.
    2. 2.  Basic knowledge of HTML, PHP and MySQL Interest in MVC and CMS frameworks to reduce development time A web server with PHP/MySQL installed on it Joomla! 2.5 package downloaded and installed ◦ it can be downloaded from NOTE: This presentation is focused for the beginners in Joomla! and would cover only a basic overview due to limited time. Further details can be discussed separately later.
    3. 3. An overview of both theJoomla! Extensions tounderstand thebasics, conventions andstructure.
    4. 4.  What is a module? ◦ Modules are lightweight and flexible extensions used for page rendering. These modules are often “boxes” arranged around a component on a typical page. A well-known example is the login module. Why should we use a module? ◦ Can work standalone ◦ Good for code reusability ◦ Can work with component for database linking Conventions ◦ Module name should be in small letters ◦ Module name should have a prefix “mod_”
    5. 5.  Depends on template Added in template using below code: ◦ <jdoc:include type="modules" name=“module-positon- name" /> Can be more than one modules on a page
    6. 6.  Go to Joomla! Admin Panel Access Top Menu>Extensions>Template Manager Click on options button on the top-right side of the toolbar Enable the “Preview module positions” Go to website front panel and add “?tp=1” to the url ◦ It will reveal the module positions in a Joomla template
    7. 7. Go to template manager
    8. 8. Click on options
    9. 9. Enable setting to previewmodule positions
    10. 10. Open your page with “?tp=1” at the end of url and it will reveal all Module positions
    11. 11.  Mod_modulename – module folder ◦ mod_modulename.xml ◦ mod_modulename.php ◦ helper.php: This helper file contains a class to provide various static functions to perform operations. It could be used to perform some calculation or to fetch data from DB. ◦ index.html: It is an empty file and created to prevent direct access to the directory. ◦ tmpl folder  default.php:  index.html: It is an empty file and created to prevent direct access to the directory.
    12. 12.  What is component? ◦ Components are the main functional units of Joomla!; they can be seen as mini-applications. ◦ A component can contain a module and a plug-in Why should we use a component? ◦ To manage more functional part or application ◦ To provide backend handling to a front-end functionality Conventions ◦ Component name should be prefixed by “com_” e.g. com_componentname ◦ Component name should start with small letters
    13. 13.  Depends on template Added in template using below code: ◦ <jdoc:include type="component" /> Can be only one component on a page
    14. 14. Image credit:
    15. 15. Website Backend:Website Front-end: admin/index.htmlhelloworld.xml admin/helloworld.phpsite/index.html admin/controller.phpsite/helloworld.php admin/models/index.html admin/models/fields/index.htmlsite/controller.php admin/models/fields/helloworld.phpsite/views/index.html admin/models/forms/index.htmlsite/views/helloworld/index.html admin/models/forms/helloworld.xmlsite/views/helloworld/view.html.php admin/models/helloworld.php admin/models/helloworlds.phpsite/views/helloworld/tmpl/index.html admin/views/index.htmlsite/views/helloworld/tmpl/default.xml admin/views/helloworlds/index.htmlsite/views/helloworld/tmpl/default.php admin/views/helloworlds/view.html.php admin/views/helloworlds/tmpl/index.htmlsite/models/index.html admin/views/helloworlds/tmpl/default.phpsite/models/helloworld.php admin/views/helloworlds/tmpl/default_head.php admin/views/helloworlds/tmpl/default_body.php admin/views/helloworlds/tmpl/default_foot.php admin/views/helloworld/index.html admin/views/helloworld/view.html.php admin/views/helloworld/tmpl/index.html admin/views/helloworld/tmpl/edit.php admin/tables/index.html admin/tables/helloworld.php admin/language/en-GB/en-GB.com_helloworld.ini admin/language/en-GB/en- admin/controllers/index.html admin/controllers/helloworld.php admin/controllers/helloworlds.php
    16. 16.  I look forward to learn and share more with you in future too. I can be reached easily at my blog and/or using twitter @vishwashgaur
    17. 17.  XAMP: Joomla!: JED: Joomla! Forum: Joomla! Magazine: Joomla documentation: Joomla 2.5 essential training: Joomla! For beginners guide 2012: Joomla! Developers guide: