Active Web Hosting Logo


Working With Mambo
Creating Your Layout

If you have been following this tutorial in succession, you already have a good idea of the inner workings of Mambo, and also how to modify a template to suit your needs. Next, we'll cover using modules to create a layout. Basically, you can use modules to determine what is placed where on your web site right from within Mambo. Furthermore, you can also add module support to different areas of the template.

Previewing Your Site

While you are working on your layout, you'll want to keep a separate window (or tab) open to view your changes. To do this, Go to Site -> Preview -> In New Window. This will give you a view of the site as a guest (unregistered) visitor would see it in a new browser window (or tab, depending on your web browser settings).

Adding or Deleting A Module (section)

To get started, go to Modules -> Site Modules and you'll see a list of modules that are currently available. In the Published column you'll see there are icons to determine if the module is actually displayed on your site or not. The icons with a green checkmark are the ones you should see on your site, while icons with a red 'x' are those that are available but not active on your site. You can change the status of any module (thus adding or removing them from your site) by clicking on the icon in the Published column. This toggles the icon between the two states.

The Module Shows Published But Not Seen On Site

If you see that a module has a published icon but you don't see it anywhere on your actual site, first, determine if it is set to only be displayed to registered users or on certain pages. Click on the module name to go to it's properties page. In the Pages/Items area on the right of the page, see if it is set to All. If not, see what page(s) it is to be shown on and then go to the page in the site preview. It should be seen.

If not, see if the module is only visible to registered users. On the left of the module properties page, look at the Access Level box. If it says "Registered" or "Special", then you'll need to log in as administrator to see it. You can also change this by selecting another level and then clicking the Save icon in the upper right of the page. Be sure to refresh your browser after any changes you make.

Adding A Module To A Template

If you still can not see the module, it may be that the template does not have a place in it for that particular module. You can do one of two things, set the Position to another setting, or edit the index.php file in the template directory of the template you're using to include the item. Note that the position setting name corresponds to the item you'll want to add to the template. For example, if you want set the position to banners (always be sure that another module isn't currently using that same setting), you can add the following code to the template anywhere you'd like the module to appear. Then go back to your preview and refresh the page.

<?php mosLoadModules ( 'banner' ); ?>

There are also some user defined positions you can use in the mosLoadModules function in your template. They are shown in the position setting as userx where x is a number from 1 to 9.

Creating Your Layout - Moving Modules

Besides adding and removing (ie. publishing and unpublishing modules), you can also move modules around on your page. Remember, the template has the mosLoadModules in certain parts of the page, and it will load any module that has the position set to what is in the quote marks in the mosLoadModules function. So, you can simply set a module's position and have it appear in a different spot on the page. Common areas are left, right, top, bottom, header, and footer, which most templates support. Refresh your page to see the new look. Some modules may not fit right however, as they are designed to display only in certain areas of pages or are of a certain size. If this is case, simply move it's position to another part of the page where it will best fit.

Creating Your Own Module

You can also create and add your own module to your site. Let's make a button ad for our Free iPod Contest as an example. First, sign up your domain. Now follow these simple steps to add the module to your page. We'll add this on the right side of the page at the top of all other items, assuming that your template has a right sidebar.

  1. In your Mambo Administration, go to Modules -> Site Modules. Click on the New icon at the top right of the page.

  2. Fill in the title: Free iPod Contest

  3. Show Title: No (Note that this is because we'll be displaying the banner instead.)

  4. Position: right

  5. Leave the Module Order as-is for now. This can be changed later.

  6. Access Level: Public (This is so everyone, including unregistered visitors can see this contest graphic and vote for your site.)

  7. Published: Yes

  8. You won't need to do anything in the Parameters or Pages/Items areas.

  9. In the large HTML text box, first find the HTML icon and click on it. This is the last icon in the 2nd row of icons. We are doing this to go into plain text mode so that we can enter the HTML code for the banner link.

  10. In the pop-up HTML editor, enter the following code. Change the highlighted text to your actual domain name. Also note that the second and third lines of this code need to be on the same line. They are split up here for easy reading.

    <a href="http://www.freeipodcontest.com?your_site_here.com">
    <img src="http://www.freeipodcontest.com/images/winipod-120x60.gif" width="120" height="60" alt="Vote for this site and Win A FREE iPod!" border="0">
    </a>

    Click the Update button in the lower right when done.

  11. You'll see the icon in the HTML area. Scroll up to the top of the page and click on the Save icon in the upper right of the page.

Finding Your Module Listing

When you are done, you might not find your new module. At the bottom in the blue bar, you will see Start, Previous, some numbers and Next, and End. Click on the Next link to see the next page of modules. Do this until you can see your module listed. Now you know where to find it if you wish to make changes.

Positioning Your Module

Go to your site preview and refresh the page. You should see the icon somewhere on the right site of the page. You may have to scroll down to see it. Take note of the other titles on the page, such as maybe Polls or Who's Online. Now go back into your administration page and click on your new module's name. In the Module Order area, click on the item that was on the top of the right side. For example, if the first item in the right side happened to be Polls, then select 1::Polls from the drop down box next to Module Order. Click on the Save icon in the upper right of the page. Refresh your site preview page. This places it under the Polls area.

What if you want the item at the very top? Go into the Modules -> Site Modules and find your new module using the navigation on the bottom. In our example, our module would appear listed under Polls, just like it would in the actual page. Look at the Reorder column and you'll see large blue arrows. Click on the up arrow next to your new module and it will move this module up one, (for example, above polls). Refresh your site preview and you should see your new module as the first one on the right side of the page.

Plan Your Site Module Positions

Now that you know how to manipulate and move modules, you will want to sit down with possibly a piece of paper and sketch out what you would like to see where on your site. Determine which modules should be displayed and where. Then go into your Mambo administration and set up your modules as per your planned layout. If in the future you wish to alter your site, it's easy to add, remove or insert modules and code anywhere into your site or template.


Previous Page: Mambots [ Index ] Next Page: Menus & Content

 


Home - Support - Management - About Us
... Active Web Hosting, 213 N Stephanie St G318, Henderson, NV 89074 ...
(702) 449-2337