Adding an iframe for additional content can be a bit complex for some Moodle teachers, especially if they do not understand HTML very well.

To make it easier, you can use the Generico Filter plugin to create a short code for teachers or content creators to add an iframe that can be controlled from the template.

First you will need to have the Generico plugin installed on your Moodle server.

https://moodle.org/plugins/filter_generico

After installing you will need to enable the Generico filter. You can enable the Generico filter at:

Site Administration -> plugins -> filters -> manage filters

Once you have the Generico filter installed you will need to go to templates and create a new template.

Site Administration -> plugins -> filters -> Generico > Templates

Select an empty template number from the list of templates. 

Complete the following settings for the new Template

  1. Enter the text ‘iframe’ in lower case.
  2. Enter a name for the template ‘iframe’ will be ok.
  3. Enter a version number (for your reference)
  4. Type in the following text {GENERICO:type=”iframe”,url=””}
  5. Type in the iframe code <iframe style=”width:100%;height:600px;” src=”@@url@@”></iframe>
  6. Type in URL=
  7. Create a new Moodle page in your course Generico iframe Example
  8. Paste the Generico short code with the URL of the page you would like to embed.{GENERICO:type=”iframe”,url=”https://ricoshae.com.au”}

You can now view the iframe page in Moodle as shown below.

The benefits of using the plugin is that anyone can add an iframe by using the {GENERICO:type=”iframe”,url=”https://ricoshae.com.au”} short code without knowing or using any HTML. 

You can replace the https://ricoshae.com.au with your own url when adding the short code.

As an administrator, you can go back to the template and globally modify the height and width of the iframe or you can set styles and other iframe options  that will update for all instances where the template is used.

I hope this has been useful for you.

 

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *