In our last article, we showed you how to use spacers in a Joomla 2.5 plugin's XML file. Using spacer fields, you can add HTML to your plugin's settings page.

How to use Spacers to add HTML

The key to using HTML within a plugin is to change:

  • > to >
  • < to <

If we wanted to insert the following link into a plugin's settings page:

InMotion Hosting provides the <a href='http://www.inmotionhosting.com/joomla-hosting/best-joomla-hosting.html'>best joomla hosting</a>

... We would need to change the code to:

InMotion Hosting provides the &lt;a href='http://www.inmotionhosting.com/joomla-hosting/best-joomla-hosting.html'&gt;best joomla hosting&lt;/a&gt;

Example Spacer code that prints HTML

The following is the code we added to our plugin's XML file and the results:

<field name="great-joomla-hosting" type="spacer" description="InMotion Hosting provides joomla hosting" label="InMotion Hosting provides the &lt;a href='http://www.inmotionhosting.com/joomla-hosting/best-joomla-hosting.html'&gt;best joomla hosting&lt;/a&gt;" />

using-html-in-a-plugin-xml-file

Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve our Support Center:
Email Address
Optional, but our team may contact you for more information.
Like this Article?

Post a Comment

Name:
Email Address:
Comment:
Are you a bot?
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!