Relationship between modules and components (joomla)

Source: Internet
Author: User

When I first learned about joomla, I was always confused about the relationship between modules and components. The two are similar and different. I once made a big difference in the relationship and difference between them. What is the difference between them? These problems can be felt in practical application. This article will try to use examples on this site to talk about these problems, so as to have an intuitive feeling, let the beginners put the module) this is a small and important issue with the component. As for the trigger (BOT), write another article.

The module function is to display the background content on the webpage. A module corresponds to a certain area on the webpage, for example, a simple counter mod_digit_counter can be found in the upper left corner of this site. Mod_digit_counter is a module (you can search and download from the Internet, and download will be provided after this site). The function is very simple. It only displays a counter on the webpage. Where does the data come from, it is obtained from the original joomla database. After you have installed and configured the module, it will work normally. It is so simple. As for the Module Settings, each module is different. You can refer to the corresponding instructions of the module, which is generally very simple. This module is the simplest and has no settings. This module can be used by beginners.
Use the following modules.

In terms of functions, the component is a function not provided by joomla itself. For example, the message board function is not provided by joomla itself. In this case, many components can be used to provide this function, for example, easybook and bookjoomlas. This site uses bookjoomlas. The following describes bookjoomlas. After the bookjoomlas component is installed, the front-end does not display it (maybe there is another one, but I have not seen it). This is the difference with the module, you need other operations to display the bookjoomlas message board at the front end. Are there many other operations? There are not many links. One operation is to create a link. The link I mentioned here is the menu item in joomla (menu
ITEM), note that it is a menu item, not a menu. This is very important (for this question, please refer to another article on this site ). How to create this menu item, you first enter the menu, then select the new menu, select the component type of the menu item in the new window, and click Next, select the corresponding component in the new window. Of course bookjoomlas is selected here, and enter a name. The name I name on this site is "I want to leave a message ", these four words will be displayed on the front-end page. Please refer to the right corner of this site. Click Save. Another operation is to use the corresponding module of this component. For example, I need
What should I do if the latest message is displayed on the right side of the page? For example, you can install the module mod_bookjoomlaslast corresponding to bookjoomlas on this site. You can also see the function of this module from the name of mod_bookjoomlaslast. After installing this module, set the release location of this module and publish it. Then you can see the effect on the front-end. You can also check the latest message on the right side of this site. Someone may ask, what is the difference between some components and modules and some components that do not need to be used together with modules? There is no certain rule, and bookjoomlas is used as an example. It can be used independently, do not use modules. The module with the latest message is only a display function on the bookjoomlas component, and the data it obtains.
All are in the bookjoomlas component.

Then there is another question: When should modules be used independently and when should modules be used together with components? You can look back at the mod_digit_counter. You can understand that when the data displayed by a module on the front end is obtained from the joomla database (or the module itself has data ), it does not need to be used with components. When the data to be displayed by the module needs to be retrieved from the database of the corresponding component, it needs to be used with the corresponding component. (The database of the corresponding component is incorrect. It should be said that some new components will be created in the joomla database when these components are installed, and the data of these components will be stored in these tables .}

I don't know whether to clarify the differences and functions between modules and components. I wrote it for an hour without knowing it. You can leave a message if you have any questions.Author:Hotart
Time:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.