The HTML Structure Edit plugin allows administrators to modify the default HTML templates, enabling customised layouts and designs and script inserts within the Blesta client area.
Free - View Pricing
What HTML Structure Edit gives you
Configure it independently for each brand on a multi-company install, so every company runs with its own settings.
Every staff and client label ships in editable language files, ready to translate into any language or reword to match your brand.
It adds itself to your client-facing pages automatically, with nothing to paste into a theme file and nothing to re-apply after a Blesta upgrade.
Turn all injection off with one checkbox and back on again later, so you can disable third-party scripts while debugging without losing the code you wrote.
By default only client-facing pages are touched. Tick one box and your code is injected into the staff area too, for internal tooling or staff-side tracking.
Encode and decode JSON and generate HMAC signatures inline in your snippet, which is exactly what live-chat and support widgets need for verified visitor identity.
Paste markup, styles or scripts into the end of the page head, the start of the body or the end of the body, and it appears on every client-facing page automatically.
If one of your snippets fails, that section is skipped and the page still renders, so a typo in a tracking tag cannot lock you out of the very pages you need to fix it from.
Each section is edited in a built-in code editor with line numbers, HTML, CSS and JavaScript highlighting and bracket matching, so long snippets stay readable and typos are easy to spot.
Insert the logged-in client, the company record and its ID, the logged-in staff member and the current page address straight into your markup, so analytics, chat and support tools can identify the visitor without extra work.

Drop analytics, chat widgets, verification tags or custom styling into every page of your Blesta site without touching a single template file.
Adding a tracking pixel, a live chat script or a bit of custom CSS to Blesta usually means editing theme files by hand, and re-applying those edits every time you update Blesta. HTML Structure Edit removes that entirely: paste your markup into three boxes on one settings page, and it is injected into every client-facing page automatically, with nothing to touch in your theme and nothing to redo after an upgrade. A built-in code editor, live tags for the current client, company and staff member, and a couple of helper functions make it flexible enough for anything from a Google Analytics snippet to a signed chat-widget identity.
Installing and updating extensions can now be done automatically through the Blesta Club Subscription Manager - this is the recommended way going forward.

Upload the extension folder into your Blesta installation so it lands under your Blesta directory at:
plugins/html_structure_edit/
For example, on a typical install: /var/www/html/blesta/plugins/html_structure_edit/
This plugin registers no cron tasks and reaches no external API - once you save a section, it starts appearing on your pages immediately.
You're ready to go - see the usage guide for a walkthrough of day-to-day use.
Installing and updating extensions can now be done automatically through the Blesta Club Subscription Manager - this is the recommended way going forward.

Upgrading works just like installing: upload the new files over the old ones, then run the upgrade from the same page you installed it on.
<%company%>, <%staff%> and <%uri%> template tags. Both new settings default to match your current behaviour (injection stays on for client-facing pages, admin pages stay untouched), so nothing you've already configured changes until you deliberately flip one of them. This version also stops the plugin from ever injecting into its own settings page, so a mistake in your code can no longer lock you out of the page that fixes it.The plugin never injects into its own settings screen, so Settings > Company > Plugins > Manage for HTML Structure Edit is always reachable. Go there directly (type the URL if the navigation is unusable), untick Enable injection on client-facing pages or clear the offending section, and save.
If the admin area cannot be reached at all, one SQL statement against your Blesta database turns injection off:
UPDATE html_structure_edit SET enabled = 0 WHERE company_id = 1;
Replace 1 with your company id. To clear the code instead, use
SET head = '', body_start = '', body_end = ''.

Go to Settings > Company > Plugins, find HTML Structure Edit in your installed plugins, and click Manage. This is the only screen the plugin adds to your admin area.
Two toggles sit above the three code sections:
Below the toggles are three code editors with line numbers, syntax highlighting and bracket matching:
<head> tag. Good for CSS and tags that need to load early, like verification meta tags or analytics snippets.<body> tag. Good for banners or anything that should appear before the rest of the page content.</body> tag. Good for chat widgets, floating buttons and scripts that don't need to block the page from loading.An Available Tags reference and an Available Functions reference sit alongside the editors, listing every tag and function you can use (see below). Click Save changes when you're done.
Note: admin-area pages have no logged-in client, so the
<%client%>tag resolves to an empty value there. The<%company%>,<%company_id%>,<%staff%>and<%uri%>tags still work. Don't template client-specific fields into code meant only for the admin area.
Insert dynamic values into any section with <% ... %> tags:
<%client%> - the logged-in client record; used bare it prints the client's name (empty when nobody is logged in, and on admin pages), or use a property directly, e.g. <%client.first_name%> or <%client.email%>.<%company_id%> - the current company id.<%company%> - the current company record; used bare it prints the company name, or use a property directly, e.g. <%company.name%> or <%company.hostname%>.<%staff%> - the logged-in staff record; used bare it prints the staff member's name (only populated on admin pages when admin injection is enabled), or use a property directly, e.g. <%staff.first_name%>.<%uri%> - the current page's request address, so a snippet can vary by page.Tags are inserted exactly as stored - escaping is yours to do. Because raw output is the whole point of this plugin, tag values are not HTML-escaped. A field a client controls (their first name, company name or address) printed straight into your markup renders as markup. If you're printing a client-supplied value into HTML, append the
force_escapefilter:<%client.first_name|force_escape%>(|eis the same filter under a shorter name). Values you control (<%company_id%>,<%uri%>) don't need it.Use
force_escape, notescape- the bundled template engine runs|escapetwice and prints&lt;where you wanted<. Still safe, just wrong-looking.Don't print client-controlled values inside a
<script>block. Neither|escapejsonnor thejson_encodefunction (below) escapes a</script>sequence, so a value containing one closes your script tag early. Put the value in adata-attribute with|force_escapeand read it from JavaScript instead.
Call a small set of helper functions with <;function<:>arg1<:>arg2;> syntax:
<;json_encode<:>value;> - JSON-encodes the value.<;json_decode<:>json;> - decodes a JSON string.<;hash_hmac<:>algo<:>data<:>key;> - an HMAC signature, e.g. <;hash_hmac<:>sha256<:><%client.first_name%><:>some_secret;>.A malformed function or tag never takes the page down. A function call that fails (an unsupported hash_hmac algorithm, or too few arguments) falls back to its own raw <;...;> text with a comment noting the failure - other tags and functions in the same section still resolve normally. A <% ... %> tag that fails to parse falls the whole section back to its raw, un-rendered content with a comment noting the failure.
There's nothing for your clients to configure. Whatever you save in the three sections simply appears on the pages they visit - a banner, a chat widget, custom styling - exactly as you wrote it, personalised with their own name or company details if you used the template tags.
UPDATE html_structure_edit SET enabled = 0 WHERE company_id = 1; (replace 1 with your company id), or SET head = '', body_start = '', body_end = '' to clear the sections outright.v2.0.0 - 2026-09-11
PHP 7.2 - 7.4, 8.1 - 8.4 · Blesta 5.x
Fixed every licence error message rendering as a blank box instead of explaining the problem
The plugin no longer injects into its own settings page, so a mistake in your code can never lock you out of the page that fixes it
The update now checks for each column before adding it, so a failed update can be retried
Pages no longer perform three record lookups when none of your sections use a template tag
Added a master enable/disable toggle to switch injection off company-wide without uninstalling
Added an option to also inject into the admin area (off by default)
Added a syntax-highlighting code editor (CodeMirror) for the three code sections
Added the <%company%>, <%staff%> and <%uri%> template tags
v1.0.0 - 2024-09-22
PHP 7.2 - 7.3, 8.1 - 8.4 · Blesta 5.x
Blesta Club release
Get exactly what you need and want.
Requires PHP 7.2 - 7.4, 8.1 - 8.4 · Blesta 5.x
Value: Free
Not sure whether to lease or own? Our FAQ explains how the licence types differ.
What our customers say
(1 customer review)
I installed the HTML Structure Edit plugin in seconds and immediately gained the power to drop tracking scripts, custom styles, or third-party widgets straight into my Blesta header and footer. No core hacks required and no worries about losing changes on the next update.
It is possible to leave a review only if you have purchased this extension or a Club tier which contains it.
We reserve the right to alter wording or formatting for presentation.
We will discuss any changes made and offer the option to withdraw review text if the changes can't be agreed on.
It may take up to 1 hour for a review to appear or update due to caching.
More extensions to explore
Plugin
Integrate the Announcements plugin to provide updates and news to your clients.
PHP 8.2 - 8.4 · Blesta 6.x
Plugin
Download multiple invoices simultaneously.
PHP 7.2 - 7.4, 8.1 - 8.4 · Blesta 5.x
Plugin
Automate Convoy stock management.
PHP 7.2 - 7.4, 8.1 - 8.4 · Blesta 5.x
Plugin
Give your clients rewards based upon service purchases.
PHP 7.2 - 7.4, 8.1 - 8.4 · Blesta 5.x
Plugin
Integrate Crisp live chat into your client area.
PHP 7.2 - 7.4, 8.1 - 8.4 · Blesta 5.x