Mambo Parameters

When you are writing a custom module or component for Mambo you can have parameters which are set in the Admin control panel and feed through to the application at run time. This allows the same code to have separate instances with distinct differences.

Consider when you add a “Latest Content” module to the right hand side of the page. You can specify the category and the sections. When you are setting up syndication you can specify which of the feed types you would like to make available.

This is done through parameters. I had a hunt for a list of the parameter types and couldn’t find one so, here goes!

Parameter Types

Attribute Types

The Parameters Types

Text allows you to capture free text information and will be used to collect category numbers, class suffixes, colors and anything which needs to be flexible.

NB: Parameters can’t be dynamic or dependant on other data in the system – the answers must be hard coded. How you use them is another matter altogether.

[code] [/code]

Text Areas are the same as in normal html. They may capture a larger amount of content than a standard text parameter.

[code][/code]

Additional textarea parameters

  • rows=”5″
  • cols=”30″

Lists are valuable when there are a number of options a user may select and you want to control which they choose. Lists builds a select control. A list has additional tags for each of the options.

[code][/code]

Radio buttons can be used for choices a user may make and are better suited to situations where there are only 2 or 3 choices.

[code][/code]

Imagelist is a special parameter to allow the user to select an existing image from the server.

[code] [/code]

hide_default=”1″ < -- a parameter used by the weblinks module for imagelist Spacer is purely for layout purposes.

[code][/code]

The Attribute Types

name is the parameter name which will be referenced in the component or module.
type is the type of parameter so that Mambo generates the right html.
label is the label shown on the form.
default is the default value which can be used to prevent a blank value.
description is shown in the mouseover on the help button.
size is the maximum number of characters which can be entered into a text parameter

This information may change over time, so if you are developing Mambo components and modules you may benefit from bookmarking this page.

Categories

Recent Comments

Tags

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.