Using Spacers to separate plugin parameters in Joomla 2.5

Joomla 2.5 has reached its end of life as for 12/31/2014. Please be advised this may be a security risk to your website. You can view more information about the end of life here.

In our last article, we showed you how to use fieldsets to divide parameter settings in a Joomla 2.5 plugin. Within each feildset, you can use spacers to help divide the parameters even further.

Look at the following sample code:

<fieldset name="basic">
    <field name="text-options" type="spacer" default="Text Settings" label="&lt;b&gt;Text Settings&lt;/b&gt;" description="Text Settings" />
        <field name="alt-text"  type="text" default="" label="Alternative Text" description="Besides Hello World, you can specify other text here to print to the screen instead." />
    <field name="font-options" type="spacer" default="Font Settings" label="&lt;b&gt;Font Settings&lt;/b&gt;" description="Font Settings" />
        <field name="color" type="radio" default="black" description="Which color should the message be displayed in?" label="Color">
            <option value="black">black</option>
            <option value="red">red</option>
            <option value="blue">blue</option>
        </field>
        <field name="font-size" type="list" default="12" description="What size font should the message use?" label="Font size">
            <option value="8">8px</option>
            <option value="12">12px</option>
            <option value="16">16px</option>
        </field>
</fieldset>

Highlighted in red are two fields with a type of spacer, type=”spacer”. You can see in the screenshot below how spacers can be used to divide parameters.

using-spacers-in-fieldsets

Was this article helpful? Join the conversation!

Server Madness Sale
Score Big with Savings up to 99% Off

X