|
Embed a Module into Content |
How to publish a module directly into a Joomla content item.
If you've ever asked, "How can I put a module right into content?"
Here's how:Joomla has a bot/mambot to load a module into a position. It is called MOSLOADPOSITION.
Just put { mosloadposition name } where:
- there are no spaces after the " { "
- no spaces before the " } "
- name is the module position name that does NOT exist in your template
Steps:
- Create a new module position (Site > Template Manager > User Positions). Give it some meaningful name
- Publish a module to this position. This can be a 3rd party module or a user defined module.
- Enter the mambot code into the content
In your content item enter the following: { mosloadposition user8 } (be sure to remove extra spaces before mosloadposition and after user8, spaces were added intentionally in this example). This will be replaced by the content of the module(s) assigned to that position.
Would you like to see some examples?
First ExampleThis example loads any modules published to position "content1." And the only module published to this position is a user module I created and assigned to the "content1" position.
Sample Embed 1
 This is some text entered into a user module (Module Manager > New).
There - how does that look?
Now lets include a little typography
Sample Embed 1
 This is some text entered into a user module (Module Manager > New).
This was done using RocketTheme's
[span class = info] tag around the mosloadposition bot
And here is another example
Now let's get a little fancy.
Can you dislplay the contents of a module within a content item and further display that content using a bot to format it?
YES!
The example below is using the bot: StyleBoxOP mambot. To show what it looks like, I've included the bot usage (readme) file as the text. It will display the module in a gray box, right justified with the text flowing around the box.
Here is the set up content so we can see the module output
Styleboxop Usage Tutorial
THE "STYLEBOXOP" ORTHOPAL MAMBOT
Please use styleboxjp instead of styleboxop in the new 0.3 version of
stylebox. Also at times the mambot does not work till you make some
change in the backend parameters and click save. So please try that if
it does not work out of box. Just make like echo to no and click save
ot change text color and save or anything like that and later change it
back to what you want. The styleboxop mambot for Joomla 1.0.x allows you to create magazine
style text in articles presented in colorful round corner boxes. All
you need to do is install the mambot and upload the pictures from the
image library available on the orthopal website and ftp the pictures in
"images" folder which would be "mambots/content/styleboxop/images"
folder of your website. I can not put the file description of so many
images in xml file so you will have to do it yourself. Everybox is made
up of 8 tiny images.
Ok, done with the introduction. Let's get on to some real stuff. I
personally get bored of reading these introductory notes and I am sure
many of you too are like that.
This is very cool stuff. Thanks to the ubergeeks at Joomla Prodigy for this little bot.
If you are using templates from RocketTheme , you can use their typography styles to enhance the look of the module's output.
Another idea is to display output from another site using a module with a newsfeed link, then displaying the feed content in a nicely formatted style within the content article. Want to see this example? Click HERE .
My mind is reeling with the possibilities and the benefits of using this technique to enhance SEO.
|