HTML Widget
A HTML widget gives you the ability to show almost anything in the sidebar. You can have some text, with an image, a link to another website, a list of important imformation, or any combination of these things.
Adplugg
If you need to add any Adplugg code in a widget to show the output for advertising, create a HTML widget and set the Text format
to Embed HTML
. The script for adplugg usage is already in the header for the site so doesn't need to be added again. You will also need to tick the checkbox to remove padding from the widget to ensure the ad is displayed correctly.
Configuring your widget
Before you can set up this type of widget you need to complete the instructions in the Sidebar guide and select the Element Type as HTML
.
Once you've done that you'll get a field which needs content adding.
The field which shows is an editor which will allow you to add a wide variety of formatted content. Add any content that is required.
If you need to add HTML directly, you can click the Source button to toggle source view and you can then paste/add in any html content.
Before going too far with this you may need to adjust the Text format as this dropdown will affect the content complexity you'll be able to add. More information of these can be found by clicking the 'About text formats' button, but the main ones you'll need are listed here:
- Restricted HTML - Allowed HTML tags:
<a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
- Basic HTML - Allowed HTML tags:
<a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id> <p> <br> <span> <img src alt height width data-entity-type data-entity-uuid data-align data-caption>
- Full HTML - All HTML tags allowed.