HTML Structure for Joomla
HTML Structure is a content plugin designed for Joomla 5 and 6. It helps you reuse HTML page code inside articles and Custom HTML modules without nesting a second HTML document inside your Joomla page.
The plugin extracts CSS and JavaScript, registers them through Joomla’s Web Asset Manager, and removes unnecessary document tags. Your saved content stays unchanged—processing happens when the page is displayed.
Main Features
-
Supports articles and Custom HTML modules.
-
Handles external stylesheets,
<style>blocks, and external or inline JavaScript. -
Removes document wrappers such as
<html>,<head>, and<body>. -
Removes pasted titles, metadata, and
<base>tags while keeping Joomla’s page settings. -
Preserves element-level styles such as
style="color: red". -
Lets you select articles by ID or process only content containing a marker.
- Compatibility: Joomla 5 and 6.
Installation
-
Download the plugin.
-
Go to System → Install → Extensions and upload the ZIP.
-
Open System → Manage → Plugins, find HTML Structure, and enable it.
You can install an update over the existing version.
Using It in Articles
Paste your HTML into the editor’s source-code view, then save the article.
Your editor and Joomla Text Filters must allow the required HTML, CSS, and JavaScript. The plugin cannot restore code removed during saving.
Using It in Custom HTML Modules
-
Enable Process Custom HTML modules in the plugin settings.
-
Open your Custom HTML module.
-
Set Prepare Content to Yes.
-
Paste your HTML in source-code view and save.
-
Clear Joomla’s cache.
If module caching causes missing styles or scripts, select No caching for that module.
Settings
| Setting | Purpose |
|---|---|
| Article IDs | Process specific articles, such as 12,34,56. Leave empty for all articles. Does not restrict modules. |
| Process Custom HTML modules | Enable or disable module support. Enabled by default. |
| Require marker | Process only articles or modules containing <!-- htmlstructure -->. |
Important Notes
-
Use JavaScript only from trusted sources. This plugin is not a security filter.
-
CSS can affect the entire Joomla page. Use a unique wrapper class to limit its scope.
-
Scripts that access page elements immediately may need to wait for
DOMContentLoaded. -
Relative URLs may need updating when copying code from another website.
-
The plugin does not download resources or reproduce a complete website.
-
After changes, clear the cache and check the page’s appearance and functionality.
For example, suppose you want to use the source code below for your article:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Welcome Box</title>
<style>
.hs-welcome {
padding: 24px;
border-radius: 12px;
background: #eef6ff;
color: #17365d;
}
.hs-welcome button {
padding: 10px 18px;
border: 0;
border-radius: 6px;
background: #175cd3;
color: white;
cursor: pointer;
}
</style>
</head>
<body>
<div class="hs-welcome">
<h2>Welcome to Our Website!</h2>
<p>Discover our latest news, tips, and updates.</p>
<button type="button">Say Hello</button>
</div>
<script>
(() => {
function initWelcomeBoxes() {
document.querySelectorAll(".hs-welcome button")
.forEach((button) => {
if (button.dataset.hsReady) return;
button.dataset.hsReady = "true";
button.addEventListener("click", () => {
button.textContent = "Thanks for visiting!";
});
});
}
if (document.readyState === "loading") {
document.addEventListener(
"DOMContentLoaded",
initWelcomeBoxes,
{ once: true }
);
} else {
initWelcomeBoxes();
}
})();
</script>
</body>
</html>
After processing, the article will retain the HTML code as shown below:
<div class="hs-welcome">
<h2>Welcome to Our Website!</h2>
<p>Discover our latest news, tips, and updates.</p>
<button type="button">Say Hello</button>
</div>
CSS and script tags will be extracted and integrated into the source code via the Joomla framework, ensuring that the website structure functions correctly.
I'm considering purchasing your File Attachments extension for a Joomla 5 website.
I intend to use it for distributing 3D CAD model archives (ZIP files) to website visitors.
I have three questions:
1. Does the extension generate temporary download links that automatically expire after a configurable period (e.g. 5 minutes), or are the download URLs permanent?
2. Does it support rate limiting to prevent automated bots from repeatedly requesting downloads?
3. Are the uploaded files stored outside the publicly accessible web directory, and are they delivered through a PHP download controller rather than direct file access?
These features are important because I want to protect the hosting server from automated mass downloads while allowing legitimate visitors unlimited access to different models.
Thank you!
^Add a message editing option for users who cannot use this feature.