|
Apr 06
2009
|
Loading a Joomla module in the article/content areaPosted by: Jen Kramer on Apr 06, 2009 |
|
Got an email from someone looking for this information. I covered this in the Lynda.com Joomla! Advanced CSS videos but I'll write out the instructions here as well.
The basic instructions are:
- Make sure the Load Module plugin is enabled and configured correctly
- Make sure the module you want to display in the content is turned on for that page and that position
- Insert the Magic Code in the article.
- Voila. Magic happens. (Some styling may need to happen at this point, too.)
1. Make sure the plugin is enabled and configured correctly
Log into the back end of Joomla and go to Extensions - Plugin Manager. Find the plugin called "Content - Load Module". Click it to open it.
Read the description:
Loads Module positions within Content, Syntax:
[loadposition user1]
NOTE: use curly brackets, NOT square brackets for this code. If I use them here on the site, the code won't display.
In other words, insert the Magic Code [loadposition moduleposition] where you want this to appear in your content item, and things should work. Moduleposition is the module's position, i.e. left, right, inset, contentmodule, whatever you are calling it. Personally, I usually use "inset" for mine.
Take a peek in the right column for the plugin. Note that the plugin should be enabled (or this won't work). Also note the options for the dropdown, which are a variety of ways your module can be displayed. You want to pick "wrapped by divs" (if you don't need rounded corners) or "wrapped by multiple divs" (if you need rounded corners). Chances are the default of wrapped by a table isn't the best choice. Note also that this setting affects ALL instances of content-embedded module display on your site.
Choose which style you want and click Save.
2. Make sure the module you want to display in the content is turned on for that page and that position
Now go to Extensions - Module Manager. Find your module in the list, the one you want to display in the content area. Make sure it's set to whatever module position you're going to include in the Magic Code (I'm going to call mine "inset").
Click Save.
3. Insert the Magic Code in the article.
Now go to Content - Article Manager and find your article. Type in:
[loadposition inset]
You may want to view the HTML source to make sure this item appears on its own line, with no surrounding HTML tags, to make the resulting HTML as clean as possible. Otherwise, with most WYSIWYG editors for Joomla, you're likely to wind up with <p> tags surrounding the code.
Save the article. Refresh/view the article on the front end of your website.
4. Voila. Magic happens. (Some styling may need to happen at this point, too.)
You should now see your module appearing in your page. The styling is likely to be funky if you did not have styles already established for modules in articles (and you probably don't).
So it's likely at this point, you'll need to write some CSS to deal with the styling for this module.
And for that, I shall point you to the Lynda.com Joomla! Advanced CSS videos, if you are not already familiar with how to do this. :-)

written by Nate Silva , June 12, 2009
hey Jen! Quick question... I've seen the videos, and I thought that the code was wrapped with curly brackets:
{loadposition inset}
Like so. Is this the case, or will both work? Thanks!
~Nate
written by Nate Silva , June 12, 2009
I didnt notice the note!! That's the trouble of working at a newspaper.. I have a habit of skimming!


Subscribe to this site's RSS feed