AddStuff icon
Module Id
addstuff
Group Id
org.jahia.modules
Updated
Requires Jahia
8.2.0.0
Author
pvollenweider
Category
Tools and Utilities
Status
COMMUNITY info

AddStuff group_work

javascript styles html template

AddStuff lets you insert arbitrary HTML (scripts, stylesheets, etc.) at four precise locations in every rendered page. It works as a render filter: no template change, no redeployment, no developer required.

Dependencies & Dependants

Dependencies
  • NONE
Dependants
  • NONE

Changelog 3.0.2

Bug fixes

  • Fixed CodeMirror display issues in jContent content editor: line numbers overlapping code, missing height, missing fold gutter icons (#5)
  • Added explicit `type: STRING` to GraphQL save mutations

Refactoring

  • Removed dead server-side save path (Webflow); settings are saved via GraphQL
  • Minor code quality fixes

Full changelog: addstuff-3.0.1...addstuff-3.0.2

FAQ

My injected code does not appear on the page. 
AddStuff only injects code in preview and live modes. Switch out of edit mode and verify in preview first.

The Add Stuff panel is not visible in site administration. 
You don't have the siteAdminAddStuff permission. Ask your server administrator to assign you the Site Administrator role or a custom role that includes this permission.

I saved site-wide code but the live site still shows the old version. 
Site-level changes are auto-published — no workflow is needed. If the content still looks outdated, your CDN or reverse proxy may be serving a cached response. Purge the cache for the affected pages or wait for the TTL to expire.

I saved a page-level snippet but nothing changed in live. 
Page-level changes go through the standard Jahia publication workflow. Make sure the page has been published after saving.

Can I use AddStuff on multiple sites independently? 
Yes. Each site has its own independent AddStuff configuration. Settings on one site have no effect on any other.

Is the injected code validated or sanitized? 
No. Code is injected exactly as entered. Grant the siteAdminAddStuff permission only to trusted users — a malicious or erroneous script entered at site level would affect every visitor of every page.

How To Install

How to install

Requirements: Jahia 8.2 or higher.

  1. Log in to your Jahia server as a server administrator.
  2. Go to Server Administration → Modules & Extensions → Jahia Store.
  3. Search for AddStuff, click Install, then Deploy.

Alternatively, follow the module installation tutorial on the Jahia Academy.

Once deployed, the module need to be per-site activation required.


How to use

AddStuff lets you inject custom HTML at four locations in every rendered page:

Location Injected
Start of <head> Right after <head>
End of <head> Right before </head>
Start of <body> Right after <body>
End of <body> Right before </body>

 

Injected code is visible in preview and live modes only — nothing appears in edit mode.

When both site-level and page-level snippets are configured for the same location, site-level content is injected first, followed by page-level content.

Inject code on all pages — site administrators

  1. In jContent, navigate to Administration → Sites → [your site] → Add Stuff.
  2. Fill in the relevant code editors — one per injection point — with syntax highlighting.
  3. Click Save. Changes apply immediately, no publication workflow needed.

Required permission: siteAdminAddStuff, included in the built-in Site Administrator role. To grant access without full Site Administrator rights, create a custom site role with the Site admin add stuff permission under Server Administration → Roles and Permissions.

Inject code on a single page — editors

  1. Open the page in jContent edit mode.
  2. Open the page properties and go to the Options tab.
  3. Enable the toggle Add stuff in your HTML code (only for preview/live mode).
  4. Fill in the relevant fields and click Save.
  5. Publish the page for the changes to appear in live mode.

See full documentation at https://github.com/jahia/addStuff

Images

License

MIT License