Chette Soriano
home . about . contact me
Chette Soriano *
Module Basics: Putting custom HTML content on the sideblocks | Print |  E-mail
Written by Chette Soriano   
Sunday, 23 January 2005

Note: This was written for Mambo 4.5.1a Stable

Mambo allows you to easily include custom HTML content on the sideblocks of your website. For example, if you want to put a donation button on the right column of your page.

The old way of doing this is by hard coding the custom HTML content on your template. This, however, would be a time-consuming process. Imagine if you just need to correct a misspelling, or if you simply want to temporarily hide this content from your users -- you would need to edit and manually upload your new template every time.

Additionally, if you hard code this in your template, your custom HTML content will be displayed on all your pages. As a general rule, the only things that you should hard code in your template are the elements that you want to appear permanently on all your pages.

Mambo has a more efficient way to add custom HTML content through modules. In most templates, modules are the sideblocks (or sideboxes), usually located on the left and right columns of the website.

Modules can contain various things – text, HTML, or components such as menus, polls, newsflash, etc.

The modules in chette.com

Modules can also be placed on various positions. Most templates use the left and right positions. As the name suggests, the left position are for modules you want to put on the left side of the website, and vice versa. (You can also create custom positions – header, footer, etc. I’ll try to cover that in a future article.)

The Project

Let’s say we want to put the text “Mabuhay! Welcome to my homepage!” in the left-hand portion of chette.com, right below the menu. And, we would want this text in boldface font.

The Project: Mabuhay

The first step is to login to your administration page. This is located in /YourMambo/administrator/. Then, from the top menu, go to Modules > Site Modules.

Login to the Mambo admin and go to Site Modules

This will bring you to your Site Modules page. You should now be able to see the list of the modules of your website.

Site Modules Page

We now need to create a new module. On the upper right hand side of the page, click on the New icon.

Create a new module

This will bring you to a form where you can enter the information about your module.

Enter module information here

Let’s start with the Title. The title is how you would like to call and appear on your module.

For the purposes of this project, let’s use “My Module” as the title.

In Show title, we will be selecting Yes. (If we only want our HTML content to appear, without the title, then we would be selecting No.)

Title and Show Title

Now we will specify where we want to place our module. If you are not yet comfortable with modifying your template, it is safest to just use the left or right positions. Most templates use these positions.

For this project, we will be choosing the left position, because we want our module to appear on the left column.

Module Order determines the ordering of all the modules that were placed in that position. Remember: There can be more than one module for a position. In chette.com, there are actually two modules placed in the left position: (1) the menu and (2) the newsletter module. The newsletter is ordered lower than the menu, so it appears at the bottom.

For this project, we are going to select the first item (1::Main Menu), because we want it to appear below the Main Menu module.

In Access Level you can define who can see your module -- all users (Public), or only users who are registered on your website (Registered). For this project, we will be selecting Public.

Position, Module Order, and Access Level

Published is a very useful feature. Selecting Yes means your module will be displayed (or “published”) on the website. If you select No, then this module will be hidden from all your users. This is useful if you need to temporarily hide or disable a module on your website.

For this project, we would be selecting Yes.

Content contains the meat of your module. This is where you put the content that you want to be displayed. You can put HTML code in the Content field, including image tags, forms, etc.

For this project, we would be entering the following HTML:

<strong>Mabuhay! Welcome to my homepage!</strong>

Published, ID, and Content

On the right hand side, you will see a tab labeled Location. Location is where you select the menu items that will display your module. (This is confusing to a lot of people because of the text Module Position. This is not the same as the module positions that was previously discussed in this article.).

For example, I previously created a menu item called Mambo Tips (which points to the Blog Content Category also called Mambo Tips). If I select Mambo Tips under Menu Item Links, then the module will only appear for anything that can be found in Mambo Tips, like if a user reads a Mambo Tip article. If I select None, then the module will not appear anywhere (similar effect when you set Published to No).

For this project, since we want the module to appear on all pages, we will select All.

Locations > Module Positions > Menu Item Links

We will not be using the Parameters tab for this project, but here’s an overview: The Parameters tab (beside the Location tab) lists some configurations related to RSS (when you syndicate news to other websites). At the bottom is a field called Module Class Suffix, which you can use to define custom CSS for this module.

Parameters > RSS URL, Items, Description, Enable Cache, Module Class Suffix

Now we’re ready to save the project. On the upper right hand side of the page, click Save.

Save

Our module will now appear exactly where we want it to be.

The finished Mabuhay Module Project
Trackback(0)
Comments (7)add comment

chette said:

Sorry, I didn't have much time to edit this. Feel free to send me any corrections with this article.
January 22, 2005

theperthgirls said:

thanks for the article - did not know about modules. It has given me ideas as to what I could do with it for my site.

thanks
August 27, 2005

chette said:

Hi theperthgirls! Came across your nick in OSM. Nice to see you drop by!
August 28, 2005

Steve said:

This is a great website. The tips that are here are fantastic! I am looking forward to checking back for new tips on Mambo.
October 10, 2005

Marissa said:

Helloo,

Actually i m new to use Mambo 4.5.3 to do the content. I would like to add the subscription newsletter module by using Mambo. But i don't know how to do that. So may i know how to install the module ?

Thanks !~
March 12, 2006

aa said:

Actually i m new to use Mambo 4.5.3 to do the content. I would like to add the subscription newsletter module by using Mambo. But i don't know how to do that. So may i know how to install the module ? smilies/grin.gif
August 08, 2007 | url

aa said:

:- smilies/kiss.gif
August 08, 2007 | url

Write comment
quote
bold
italicize
underline
strike
url
image
quote
quote
smile
wink
laugh
grin
angry
sad
shocked
cool
tongue
kiss
cry
smaller | bigger

busy
 
< Prev   Next >
* *
Main Menu
chette's articles
photo gallery
photos on the go
.........................
bookmarks
search
about
faq
contact me
Subscribe
About Me
chette

Name: Chette Soriano
Location: Pasig City, Philippines
Quote: The Internet: Where men are men, women are men, and children are FBI agents.

www.flickr.com
This is a Flickr badge showing photos in a set called photos on the go. Make your own badge here.
Latest Articles
*

© Copyright 1997 - 2007 Chette Soriano. All rights reserved. Contact me.

* *