Add a text block
This guide describes the text block (formerly known as the HTML block) that can be added to the right-hand column of a Moodle space or to the centre and right-hand column on the dashboard. Examples are used to illustrate the ways text blocks are used at Warwick.
The text block is a versatile block as it is has a content section with the same editing toolbar as most resources. This means that you can use HTML to create custom menus, embed media files as well as Twitter or other social media feeds. Importantly, you can add multiple text blocks to a single Moodle space.
Adding a text block
Follow the instructions in the Add a block guide to add the HTML block.
Editing a text block
- Click on the Actions menu on the right-hand side of the HTML block.
- Select Configure (new text block) block.
- Give the block a name using the Block title field.
- Click on </> to switch to the HTML view in order to add HTML code.
Using a text block
Any valid HTML code can be added to the HTML block. However, please note:
You can use:
- inline CSSLink opens in a new window
- font awesomeLink opens in a new window icons (4.70, currently)
- bootstrapLink opens in a new window markup
You cannot use:
- an external CSS file
- Javascript
Create a resources or links menu
One of the more effective uses for the HTML block is in providing a module/department wide navigation menu, particularly for links to external (SiteBuilder and elsewhere) pages.
As you can use any standard HTML, including Bootstrap, it is possible to create horizontal menus using tabs or pills, with panesLink opens in a new window, and even collapsible accordionsLink opens in a new window to create more complex versions.
We have provided an example in our reusable HTML snippets which you can read more about in the Add a course header and other visual elements guide.
Adding a Twitter feed
Display the latest tweets from any Twitter account:
- Log in to Twitter
- Follow the instructions to create a timeline widgetLink opens in a new window using https://publish.twitter.com/Link opens in a new window
- Add and configure a new HTML block to your Moodle space (as above).
- Click on </> to switch to the HTML view in order to add HTML code.
- Copy and paste the code provided by Twitter into the HTML source.
- Click Save changes.
The new block will appear in the right-hand column.
For more information on this, please contact moodle at warwick dot ac dot uk.
More information on text blocks is available in this Moodle Article.Link opens in a new window