Text
Text snippets are designed for administrators who want to add reusable, formatted content to their Joomla site without writing HTML. Use a Text snippet when you need to insert a paragraph, heading, formatted notice, or any block of copy that may appear in multiple places — such as a disclaimer, a promotional message, or a standard boilerplate. The content is written using Joomla's default WYSIWYG editor, so no coding knowledge is required.
How to Create a Text Snippet
To learn how to create a reusable text snippet in Joomla, follow the steps below:
- Log in to your Joomla administrator
- Go to Components → Tassos Code Snippets
- Click New
- Enter a descriptive Title (e.g. "Cookie Disclaimer")
- Select Text as the Code Type.
- Choose the Insertion Method
- To auto-insert the snippet to a predefined location, select Auto-Insert.
- To insert the snippet manually via a shortcode, select Shortcode.
- When using Auto-Insert, the following locations are available:
- Site Body
- Site Footer
- Admin Body
- Admin Footer
- After Article Title
- Before Article Content
- After Article Content
- When using the Shortcode insertion method, place
{tcs snippet.alias}anywhere Joomla processes content — in articles, modules, or component output. - Write your code in the WYSIWYG editor. You can format text, add links, insert images, and use any feature your site's configured editor provides (e.g. TinyMCE or JCE). The editor output is saved as HTML and injected verbatim at the chosen location.
- Open the Conditional Logic tab to restrict which pages or users the snippet runs on. Leave it empty to run it site-wide. Learn more in Using Snippet Logic.
- Set Status to Published and click Save & Close.
Difference Between Text and HTML Snippets
| Text | HTML | |
|---|---|---|
| Editor | Joomla's default WYSIWYG editor | CodeMirror (code editor) |
| Target user | Content editors with no HTML knowledge | Developers and technical users |
| Input | Formatted text via toolbar | Raw HTML markup |
| Output | Rendered verbatim as HTML | Rendered verbatim as HTML |
| Locations | Site Body, Site Footer, Admin Body, Admin Footer, Article locations | All locations |
| Insertion methods | Auto-Insert and Shortcode | Auto-Insert and Shortcode |
Both types produce identical output — the difference is entirely in the editing experience.
Troubleshooting
Content Not Appearing
- Check snippet status is Published
- Verify the location is appropriate for the page you're viewing
- Check conditional logic settings
- Clear Joomla and browser cache
Formatting Lost After Save
Some editors strip certain HTML tags depending on their configuration. If your formatting is being removed, check your editor's allowed tags / allowed content settings (in TinyMCE this is under Options → Valid Elements).
Content Appearing in Wrong Place
- For inline content alongside article text, use Before Article Content, After Article Content, or Shortcode
- Site Body and Site Footer inject into the raw page buffer and may not appear where expected depending on your template