Have you ever wanted to embed a page from a different website into your Moodle course (rather than just link to it) ? Here’s how !
Using an iframe allows external sites/pages (or indeed other content from the same site) to be displayed in Labels, Pages, or indeed pretty much anywhere you can add HTML.
- Just create a new Label, Page, Book, Lesson, or other Activity / Resource where you can see the Atto editor
- Click the HTML editor <> button to switch to the code view (don’t panic!)
- Insert code like (or just copy and past this as a working example):
<iframe width="100%" height="300" align="left" src="http://www.moodlebites.com" border="0"></iframe>
- Switch back to normal view by clicking the <> button again
The width=”100%” ensures the frame is the full width available, you can align left, right, or center (note the US spelling), and the border can be set to 0, or 10 for example, for a more obvious effect. Obviously the src=”website” is the URL you are displaying. src is just an abbreviation of ‘source’.
This is a useful tip, but bear in mind that many Moodle administrators may disable this feature (the ability to use iframes) because it could, in certain circumstances, pose a security threat, at least in terms of messing up the display of content if the code is entered incorrectly.