RawHTML
The RawHTML Widget in Astroid allows you to insert custom HTML code directly into your Joomla pages. This is useful for embedding custom elements, third-party scripts (like widgets or iframes), or advanced layout tweaks.
π What is RawHTML Widget?β
This widget is used to inject raw HTML into your layout without the editor filtering or modifying it. Ideal for developers and advanced users who want full control over their markup.
βοΈ How to Useβ
Step 1: Add the Widgetβ
- Open your Astroid layout editor.
- Click on Add Widget.
- Choose HTML from the widget list.
Step 2: Configure General Settingsβ
πΈ Custom HTMLβ
- Label: Custom HTML
- Field type: Textarea (Code)
- Use: Paste any HTML code you want to inject. Example:
<div class="my-box">
<h3>Hello from HTML!</h3>
<p>This is a custom message.</p>
</div>
π Assignment Settingsβ
Use this section to control where the widget appears.
πΉ Assignment Typeβ
Choose where the widget will be displayed:
- On All Pages β Show this widget everywhere.
- No Pages β Disable this widget (for testing or saving for later).
- Selected Pages β Show it only on specific menu items.
πΉ Menu Item Assignment (if using Selected Pages)β
If you selected βSelected Pagesβ, a menu selector will appear.
- Choose one or multiple menu items where this widget should be shown.
π‘ Use Casesβ
- Embedding third-party HTML snippets (like forms, iframes, or YouTube embeds).
- Adding custom Bootstrap containers or layouts.
- Inserting tracking codes or custom components.
β οΈ Notesβ
- Be cautious with raw HTML. Incorrect or unclosed tags can break layout structure.
- Do not insert PHP or JavaScript directly unless you're certain it's safe and allowed in your Joomla setup.
- Always test your HTML on a staging site before publishing.
π§ͺ Exampleβ
<section class="custom-section">
<h2>Join Our Newsletter</h2>
<form action="#" method="post">
<input type="email" placeholder="Your email">
<button type="submit">Subscribe</button>
</form>
</section>
Enjoy full control over your layout with the RawHTML Widget in Astroid!