Add layout and content elements to Joomla articles and other rendered site content with bracket-style tags. The package includes two plugins: one processes the shortcodes, and the other helps you insert them from the editor.
The two plugins
Install and enable both plugins for the complete experience. They have separate roles:
- System - MX Shortcodes processes shortcode markup and renders the resulting content on public pages. Its settings, including Bootstrap loading and shortcode colours, are described below.
- Button Shortcode Generator (the MX Shortcodes editor button) adds a shortcode builder to supported Joomla content editors. It inserts shortcode markup into your content; it does not render the shortcode itself.
Using the shortcode button
- Open an article or other content item and place the cursor in the editor where you want the shortcode.
- Click the MX Shortcodes button, usually shown below the editor. Search for or choose a shortcode from the list.
- Fill in the fields shown. For shortcodes with repeatable items, use the provided Add control to include more items.
- Click Add Shortcode. The builder inserts the shortcode markup at the cursor; review it and add or edit any inner content as needed.
If the button is not available, check that Button Shortcode Generator is enabled and that the editor supports Joomla editor buttons. You can also type shortcode markup directly. The System - MX Shortcodes plugin must be enabled for that markup to be processed on public pages.
Writing shortcodes manually
Enter shortcode markup in the content editor. Use double quotes around attribute values. Tags with content need a matching closing tag; item tags are placed inside their parent shortcode.
[alert type="success"]Your changes have been saved.[/alert]
[divider margin_top="24px" margin_bottom="24px" /]
Requirements: Many components use Bootstrap 5 styles or interactive behavior. Your site template should load Bootstrap 5, or enable Load Bootstrap 5 in the system plugin settings. Leave it disabled when the template already loads Bootstrap 5 to avoid loading it twice.
The icon shortcode also requires Font Awesome to be loaded by your site template. Maps rely on the Google Maps JavaScript API and an internet connection.
Shortcodes are processed on the public site in HTML pages. They are not rendered in the administrator editor preview. Avoid placing one shortcode inside another item's attribute value.
Button
Creates a Bootstrap-styled link button. Shortcode name: button.
[button link="https://example.com" type="primary" size="large" target="_blank"]Learn more[/button]
| Attribute | Default | Values / purpose |
|---|---|---|
link |
empty | Destination URL. |
type |
secondary |
primary, secondary, success, danger, warning, info, light, dark, or link. |
size |
default | small, large, or empty for the default size. |
target |
same window | Set to _blank to open a new tab/window. |
| Content | — | Button label. |
Icon
Displays a Font Awesome icon. The editor includes an icon picker.
[icon name="star" size="24" color="#e0a800" class="my-icon" /]
| Attribute | Default | Purpose |
|---|---|---|
name |
home |
Icon name, with or without the fa- prefix. |
size |
browser default | Font size in pixels. |
color |
inherited | CSS color value. |
class |
empty | Additional CSS class. |
The icon stylesheet supplies the shortcode class names. The icon font itself must be available in the active template/site assets.
Divider
Inserts a horizontal divider with configurable margins and border.
[divider margin_top="24px" margin_bottom="24px" border="1px solid #ccc" /]
| Attribute | Default | Purpose |
|---|---|---|
margin_top |
18px |
CSS top margin. |
margin_bottom |
18px |
CSS bottom margin. |
border |
0 |
CSS border-top value. |
Rows and columns
row wraps columns; each col accepts Bootstrap grid classes. The editor offers col-12 and col-md-1 through col-md-12.
[row id="features" class="my-row"]
[col class="col-md-6"]First column[/col]
[col class="col-md-6"]Second column[/col]
[/row]
| Tag | Attribute | Default | Purpose |
|---|---|---|---|
row |
id |
empty | Optional row ID. |
row |
class |
empty | Additional classes on the row. |
col |
class |
col |
Column/grid classes. |
col |
Content | — | Column content; nested shortcodes are processed. |
Bootstrap grid styling is required for the familiar responsive column behavior. Include Bootstrap 5 through the template or plugin setting.
Alert
Renders a Bootstrap alert.
[alert type="success" close="yes"]Your changes have been saved.[/alert]
| Attribute | Default | Values / purpose |
|---|---|---|
type |
secondary |
primary, secondary, success, danger, warning, info, light, or dark. |
close |
no |
Set to yes to show a dismiss button. Bootstrap JavaScript is required for dismissal. |
style |
empty | Optional inline CSS style attribute. |
| Content | — | Alert text or nested shortcodes. |
Progress bar
Displays a percentage progress bar.
[progressbar bar="65" type="success" striped="yes" active="yes" text="Complete" /]
| Attribute | Default | Purpose |
|---|---|---|
bar |
50% |
Progress percentage, clamped from 0 to 100. Enter the number (the output adds the percent sign). |
type |
primary |
Bootstrap color: primary, secondary, success, danger, warning, info, light, dark. |
striped |
no |
Set to yes for striped styling. |
active |
no |
Set to yes for animated stripes. |
text |
empty | Optional label displayed before the percentage. |
Countdown
Counts down to a date and time. Both [countdown] and the legacy-capitalized [Countdown] tag work.
[countdown date="2027-01-01T00:00:00" size="large"]
The event has started!
[/countdown]
| Attribute | Default | Purpose |
|---|---|---|
date |
required | Date/time parseable by PHP DateTime, for example ISO 8601. Invalid or missing dates produce an inline error. |
size |
medium |
small, medium, large, or custom. |
custom_size |
2rem |
Number size when size="custom"; supports CSS length units such as 32px or 2rem. |
| Content | Countdown complete. | Optional content shown once the countdown reaches zero. |
Progress pies
Displays one or more animated circular progress gauges using progresspie_item children.
[progresspie size="medium"]
[progresspie_item label="Design" value="80" color="#1756a9" /]
[progresspie_item label="Build" value="55" color="#29a36a" /]
[/progresspie]
| Tag / attribute | Default | Purpose |
|---|---|---|
progresspie size |
medium |
Gauge size: small, medium, large, or custom. |
progresspie custom_size |
9rem |
CSS length used when custom size is selected. |
progresspie_item label |
empty | Text label under the gauge. |
progresspie_item value |
0 |
Percentage, clamped from 0 to 100. |
progresspie_item color |
#0d6efd |
Gauge color in 3- or 6-digit hex format. |
Tabs
Builds a tab navigation and content panels. The first tab is active on initial page load.
[tab id="details" class="product-tabs" button="nav-tabs"]
[tab_item title="Description"]Product details go here.[/tab_item]
[tab_item title="Shipping"]Shipping information goes here.[/tab_item]
[/tab]
| Tag / attribute | Default | Purpose |
|---|---|---|
tab id |
myTab |
Base ID; unique IDs are generated for each instance. |
tab class |
tab |
Additional wrapper class. |
tab button |
nav-tabs |
nav-tabs or nav-pills. |
tab_item title |
empty | Tab button label. |
tab_item content |
— | Panel content; nested shortcodes are processed. |
Accordion
Creates a Bootstrap accordion with the first panel open initially.
[accordion id="faq" version="2"]
[accordion_item title="How does it work?"]Explanation goes here.[/accordion_item]
[accordion_item title="Can I get help?"]Contact our support team.[/accordion_item]
[/accordion]
| Tag / attribute | Default | Purpose |
|---|---|---|
accordion id |
accordion1 |
Base ID; unique IDs are generated for each instance. |
accordion version |
1 |
Style 1 or 2 (FAQ variation). |
accordion_item title |
empty | Panel heading. |
accordion_item content |
— | Panel body; nested shortcodes are processed. |
Gallery
Creates a responsive image gallery. You may supply images as repeatable items or use a folder relative to Joomla's configured Media image root.
[gallery columns="3" modal="yes" filter="yes" folder="events"]
[gallery_item src="local-images:/events/launch.jpg" tag="launch,team"]Launch event[/gallery_item]
[gallery_item src="local-images:/events/team.jpg" tag="team"]The team[/gallery_item]
[/gallery]
| Tag / attribute | Default | Purpose |
|---|---|---|
gallery columns |
3 |
Columns, clamped from 1 to 6. |
gallery folder |
empty | Optional safe subfolder under the configured Joomla Media image folder. Supported files: JPG, PNG, GIF, WebP, AVIF, SVG. |
gallery modal |
yes |
Open each image in a Bootstrap modal, or use no to link to the image. |
gallery filter |
no |
Show tag filters when set to yes. |
gallery_item src |
required for item | Image source, selected in the editor media picker. The editor's local-media value uses local-images:/path/image.jpg. |
gallery_item tag |
empty | Comma-separated filter tags. |
gallery_item content |
empty | Optional caption. |
Folder paths are restricted to subfolders of the Media image root; absolute paths and traversal segments are not accepted.
Carousel
Builds a Bootstrap carousel with previous/next controls when it has multiple slides.
[carousel id="feature-slides"]
[carousel_item src="local-images:/slides/one.jpg"]First caption[/carousel_item]
[carousel_item src="local-images:/slides/two.jpg"]Second caption[/carousel_item]
[/carousel]
| Tag / attribute | Default | Purpose |
|---|---|---|
carousel id |
carousel |
Base ID; unique IDs are generated for each instance. |
carousel_item src |
empty | Optional image source. When supplied, the item renders an image and optional caption. |
carousel_item content |
empty | Caption, or arbitrary slide content when src is omitted. |
The renderer also recognizes [caption]...[/caption] in slide content. The carousel needs Bootstrap 5 CSS/JavaScript.
Testimonials
Shows one or multiple testimonial cards in a responsive grid or slider.
[testimonial version="1" slider="1" columns="3" gap="16" autoplay="1" loop="1" nav="1"]
[testimonial_item name="Alex Example" designation="Designer" email="This email address is being protected from spambots. You need JavaScript enabled to view it. " url="https://example.com"]
The team was helpful and the result was excellent.
[/testimonial_item]
[testimonial_item name="Sam Example" designation="Project Lead"]
Communication was clear throughout the project.
[/testimonial_item]
[/testimonial]
Use slider="0" for a grid and version="1" or version="2" for the card style. A legacy single-item form remains available:
[testimonial name="Alex Example" designation="Designer" email="This email address is being protected from spambots. You need JavaScript enabled to view it. "]
The team was helpful and the result was excellent.
[/testimonial]
| Group attribute | Default | Purpose |
|---|---|---|
version |
1 |
Card style 1 or 2. |
slider |
0 |
1 for slider, 0 for grid. |
gap |
6 |
Item spacing in pixels, clamped from 0 to 50. |
columns |
3 |
Items per row on desktop. |
columns_tabl |
2 |
Items per row at 960–1280 px. |
columns_tabp |
2 |
Items per row at 768–959 px. |
columns_mobl |
1 |
Items per row at 441–767 px. |
columns_mobp |
1 |
Items per row up to 440 px. |
autoplay |
1 |
Automatically advance the slider; set 0 to disable. |
autoplay_timeout |
5000 |
Time between advances in milliseconds, clamped from 1,000 to 60,000. |
autoplay_speed |
1000 |
Transition duration in milliseconds, clamped from 0 to 10,000. |
loop |
1 |
Continue in the same direction across the slider boundary. |
nav |
1 |
Show previous/next controls in slider mode. |
| Item attribute | Default | Purpose |
|---|---|---|
name |
John Doe |
Person's name. |
designation |
empty | Job title or descriptor. |
email |
empty for repeat items | Optional mail link. The legacy single-item form defaults to . |
url |
empty | Optional URL linked from the designation. |
| Content | empty | Testimonial text; nested shortcodes are processed. |
Blockquote
Formats enclosed text as a blockquote.
[blockquotes]A short quotation or customer statement.[/blockquotes]
Accepts enclosed content; nested shortcodes are processed.
Map
Embeds a marked location from OpenStreetMap.
[mxmap lat="48.8584" lng="2.2945" zoom="15" height="400" /]
| Attribute | Default | Purpose |
|---|---|---|
lat |
41.3850409 |
Latitude; accepted range −85.05112878 to 85.05112878. |
lng |
2.1747294 |
Longitude; accepted range −180 to 180. |
height |
200 |
Frame height in pixels, clamped from 1 to 3000. |
zoom |
16 |
Zoom level, clamped from 0 to 19. |
The map is requested from OpenStreetMap by the visitor's browser. Invalid coordinate inputs fall back to the default coordinates.
YouTube
Displays individual YouTube videos or a channel's videos. Individual video IDs are embedded with YouTube's privacy-enhanced youtube-nocookie.com domain.
Individual videos
[youtube source="items" slider="1" columns="4"]
[youtube_item id="dQw4w9WgXcQ"][/youtube_item]
[youtube_item id="M7lc1UVf-VE"][/youtube_item]
[/youtube]
Use the 11-character video ID, not a full URL.
Channel videos
[youtube source="channel" channel="UCxxxxxxxxxxxxxxxxxxxxxx" slider="0" limit="15" show_more="1" /]
Enter a channel ID, typically beginning with UC, rather than a channel name or handle. Without an API key, the shortcode combines video IDs parsed from the channel videos page and its public RSS feed. With an API key, it requests the channel's uploads playlist through YouTube Data API; that mode requires a channel ID beginning with UC and fetches at most 50 per request. It does not paginate that API request.
Channel lookup happens during page rendering. The Joomla server must be allowed to make HTTPS requests to YouTube and Google. YouTube may restrict the page/feed results; an API key is sent to Google in the API request.
| Attribute | Default | Purpose |
|---|---|---|
source |
items |
items or channel. |
channel |
empty | Channel ID when using channel source. |
api_key |
empty | Optional YouTube Data API key. |
limit |
15 |
Initial and per-click number in channel grid mode, clamped 1–50. |
show_more |
1 |
Show “Load more” in channel grid mode if more results were retrieved than the initial limit. |
slider |
1 |
1 slider; 0 grid. |
height |
400 |
Video height in pixels, clamped 100–900. |
gap |
6 |
Spacing in pixels, clamped 0–50. |
round |
0 |
Set to 1 for rounded iframe corners. |
columns |
4 |
Desktop items per row. |
columns_tabl |
3 |
Items per row at 960–1280 px. |
columns_tabp |
3 |
Items per row at 768–959 px. |
columns_mobl |
2 |
Items per row at 441–767 px. |
columns_mobp |
1 |
Items per row up to 440 px. |
autoplay |
1 |
Automatic slider movement; set 0 to disable. |
autoplay_timeout |
5000 |
Delay in milliseconds, clamped 1,000–60,000. |
autoplay_speed |
1000 |
Transition in milliseconds, clamped 0–10,000. |
loop |
1 |
Continue in the same direction across the slider boundary. |
nav |
1 |
Show previous/next controls in slider mode. |
Column settings are clamped from 1 to 10. “Load more” applies only to channel source in grid mode; slider mode displays all retrieved videos. Both YouTube and testimonial sliders pause autoplay while hovered and use the same directional loop behavior.
YouTube or Vimeo video
mxvideo embeds a single YouTube or Vimeo URL. This is separate from the multi-item/channel youtube shortcode.
[mxvideo height="360"]https://www.youtube.com/watch?v=dQw4w9WgXcQ[/mxvideo]
[mxvideo height="360"]https://youtu.be/dQw4w9WgXcQ[/mxvideo]
[mxvideo height="360"]https://vimeo.com/123456789[/mxvideo]
| Attribute | Default | Purpose |
|---|---|---|
height |
281 |
Iframe height in pixels. |
| Content | required | Full supported YouTube or Vimeo URL. |
Typography shortcodes
Dropcap
Styles the first letter of the enclosed paragraph as a drop cap.
[dropcap]A paragraph that begins with a decorative initial letter.[/dropcap]
Block number
Places a numbered marker before text.
[blocknumber text="01" size="large" background="#1756a9" color="#fff" type="circle"]Step details[/blocknumber]
| Attribute | Default | Purpose |
|---|---|---|
text |
01 |
Number/marker text. |
size |
medium |
small, medium, large, or custom. |
custom_size |
2.5rem |
CSS size when custom is selected. |
background |
#000 |
Marker background color. |
color |
#666 |
Marker text color. |
type |
default | rounded, circle, or empty. |
| Content | — | Text following the marker. |
Block
Wraps content in a styled block.
[block background="#f4f7fa" color="#333" padding="20px" border="#ccd" type="rounded"]Highlighted content[/block]
| Attribute | Default | Purpose |
|---|---|---|
background |
transparent |
CSS background. |
color |
#666 |
Text color. |
padding |
15px |
CSS padding. |
border |
0 |
Border color as hex, or a supported border value such as 1px solid #ccc. |
type |
default | rounded, circle, or empty. |
| Content | — | Block content. |
Bubble
Displays a speech bubble with an author citation.
[bubble author="Jamie" background="#fafafa" color="#333" padding="10px" border="#ccc" type="rounded"]A message in a speech bubble.[/bubble]
| Attribute | Default | Purpose |
|---|---|---|
author |
Ahmed |
Citation label. |
background |
#CCC |
Bubble background. |
color |
inherited | Optional text color. |
padding |
10px |
Bubble padding. |
border |
0 |
Optional hex border color or supported border value. |
type |
default | rounded, circle, or empty. |
| Content | — | Bubble message. |
Tooltip
Shows descriptive text when the trigger text is hovered or focused. If tooltip text is empty, only the trigger content is rendered.
[tooltip text="More details are available here." position="top" style="dark"]Read more[/tooltip]
| Attribute | Default | Values / purpose |
|---|---|---|
text |
empty | Tooltip contents. |
position |
top |
top, bottom, left, or right. |
style |
default |
default, dark, or light. |
| Content | — | Trigger text; keyboard-focusable. |
Modal
Creates a button that opens a Bootstrap modal dialog.
[modal title="Information" button="Read details" size="lg" centered="yes"]
Modal body content goes here.
[/modal]
| Attribute | Default | Values / purpose |
|---|---|---|
title |
Modal |
Dialog title. |
button |
Open modal |
Trigger button label. |
size |
default | Default, sm, lg, or xl. |
centered |
yes |
Set to no to disable vertical centering. |
| Content | — | Modal body; nested shortcodes are processed. |
Audio/video playlist
Creates a native HTML audio or video player and a selectable track list. The provided media URLs must be directly playable by the browser.
[playlist type="audio"]
[playlist_item title="Intro" src="https://example.com/intro.mp3" /]
[playlist_item title="Main track" src="https://example.com/main.mp3" /]
[/playlist]
| Tag / attribute | Default | Purpose |
|---|---|---|
playlist type |
audio |
audio or video. |
playlist_item src |
required | Direct media URL; empty sources are skipped. |
playlist_item title |
generated track title | Track label and accessible player label. |
The first valid source is selected initially. Selecting another item switches the player source and starts playback; the browser may require a user gesture.
Assets and implementation
plg_mxshortcodes/shortcodes/contains shortcode renderers.plg_mxshortcodes/css/contains shortcode styles; CSS and JavaScript are queued when needed.plg_mxshortcodes/js/countdown.js,progresspie.js, andplaylist.jsadd their respective interactions.plg_mxshortcodes/js/youtube.jsimplements shared YouTube and testimonial slider behavior.plg_editors_shortcode/shortcodes.phpdefines fields shown in the editor shortcode picker.
The system plugin processes shortcodes in HTML output for the site client. Shortcodes inside another shortcode's content work where the parent explicitly processes nested content; use the provided item tags for repeatable components.
If shortcode source files are changed, rebuild plg_mxshortcodes.zip and plg_editors_shortcode.zip, then refresh pkg_mxshortcodes.zip to distribute the changes through Joomla's extension installer.
