skip to primary navigationskip to content
 

Adding an iframe to your page (map and Google calendar)

You can add an iframe into a static text portlet that appears in the right side of the page, below the content on the home page, or into the content of the page. To insert the iframe:

  • first you need to find what code you must add (see below for some pointers)
  • next you must make sure that your site will let you add the code and not strip it out - the html filtering is set up to protect the site and you might need to allow tags to be used before you copy in the code.
  • edit your page and look at your body text in HTML view
  • paste in the iframe code where you want the iframe to be added

University map

This is an example of how you would add an iframe of the University map, taking the URL from the map page, but removing the http: from the front.

 <iframe src="//map.cam.ac.uk/Computing+Service"></iframe>

When the page is saved at the iframe is embedded in the page, you will see that some dimensions have been added - you can change these it you want to increase the dimensions of the map shown (making the width equal to 100% will make it responsively fit the content area available):

<p><iframe height="300" src="//map.cam.ac.uk/Computing+Service" width="100%"></iframe></p> 

To get automatic zoom on the map, add zoom factor from 13 (least) to 19 (greatest), like this:

<iframe height="240" src=”//map.cam.ac.uk/Computing+Service#18" width="100%"></iframe>

Google calendar

To find the iframe code to embed a Google calendar, in the Google calendar:

  • go to Settings and click on the calendar or calendars you want to use
  • the iframe code you want is under 'Embedding this calendar' - it can be customised.