- Posts: 106
- Thank you received: 10
How to include modules in Content item for Joomla
- Support Team
- Topic Author
- Offline
- Moderator
Less
More
13 years 10 months ago #300
by Support Team
How to include modules in Content item for Joomla was created by Support Team
What's even more amazing is that you can use any of the HTML elements to position the embedded module precisely! In this example, I used a standard HTML table to position the module to the left of the text.
How this is done?
Embedding a module inside a content page is a Joomla "feature". You do not need the DirectPHP plugin to enable this.
Ssnobben has rightfully pointed out you need to use something like "{loadmodule mod_fpslideshow}". So below are the complete steps to achieve this.
Note that the steps below applies to Joomla 1.5.x only. For Joomla 1.0.x, please refer to How to include modules in Content item (for Joomla 1.0.x). The steps are slightly easier for Joomla 1.0.x.
Step 1: Set up the module
Let's first create a module for use with this example.
1. Go to "Extensions - Module Manager". Look for the module "Main Menu". Check the box besides the title, and choose "Copy" from the menu.
2. You will see a new module called "Copy of Main Menu" appearing below the original "Main Meu".
3. Click on "Copy of Main Menu". First make sure Enabled is set at 'Yes'.
4. Now, for the field "Position", first take a look at the entire list of the module positions in the pulldown menu. Then choose a new module name and just type it in there. Yes, just manually type it in, since it will not be in the pulldown selection list. This is a combobox that allows you to add new items by typing the new item in the entry field. In this example, I've chosen the new module name to be user201 as shown below..
5. In the field "Menu Assignment", for Menus, make sure you select "All":
6. Save the module.
Step 2: Create the content page
We will now create a content item for containing the module.
1. Go to Article Manager and create a new article.
2. In the article, enter the following:
This is a test to include a module inside a content page.
{loadposition user201}
3. Note that the module name after loadposition has to match the module position you have created in Step 1.
4. That's it! Save the article. We're all set!
Step 3: Let's test it
Now load the article. Did you see the "Main Menu" appearing inside that article similar to the following?
Note: If you wish to put this as the front page, go to Menu Item Manager - Main Menu, create a menu item linked to this content page, then move it to the first item. The page with the embedded module (for example, it could be a slideshow module) will become the front page.
How this is done?
Embedding a module inside a content page is a Joomla "feature". You do not need the DirectPHP plugin to enable this.
Ssnobben has rightfully pointed out you need to use something like "{loadmodule mod_fpslideshow}". So below are the complete steps to achieve this.
Note that the steps below applies to Joomla 1.5.x only. For Joomla 1.0.x, please refer to How to include modules in Content item (for Joomla 1.0.x). The steps are slightly easier for Joomla 1.0.x.
Step 1: Set up the module
Let's first create a module for use with this example.
1. Go to "Extensions - Module Manager". Look for the module "Main Menu". Check the box besides the title, and choose "Copy" from the menu.
2. You will see a new module called "Copy of Main Menu" appearing below the original "Main Meu".
3. Click on "Copy of Main Menu". First make sure Enabled is set at 'Yes'.
4. Now, for the field "Position", first take a look at the entire list of the module positions in the pulldown menu. Then choose a new module name and just type it in there. Yes, just manually type it in, since it will not be in the pulldown selection list. This is a combobox that allows you to add new items by typing the new item in the entry field. In this example, I've chosen the new module name to be user201 as shown below..
5. In the field "Menu Assignment", for Menus, make sure you select "All":
6. Save the module.
Step 2: Create the content page
We will now create a content item for containing the module.
1. Go to Article Manager and create a new article.
2. In the article, enter the following:
This is a test to include a module inside a content page.
{loadposition user201}
3. Note that the module name after loadposition has to match the module position you have created in Step 1.
4. That's it! Save the article. We're all set!
Step 3: Let's test it
Now load the article. Did you see the "Main Menu" appearing inside that article similar to the following?
Note: If you wish to put this as the front page, go to Menu Item Manager - Main Menu, create a menu item linked to this content page, then move it to the first item. The page with the embedded module (for example, it could be a slideshow module) will become the front page.
Please Log in or Create an account to join the conversation.