Crossdomain Wrapper Autoheight

From Joomdle
Revision as of 17:34, 11 December 2017 by Antonio (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Joomdle can integrate with 3rd party library iframe-resizer (https://github.com/davidjbradshaw/iframe-resizer) to allow for auto-height on multiple domain setup scenarios.

To use this, however, you will need to do additional configuration in Joomla and Moodle:

Joomla:

  • Enable option " Cross-domain auto-height" in Joomdle configuration in Joomla, "Links behaviour" section.

Moodle:

  • In the file system, locate the folder of the theme you are using in Moodle.
  • Create, if it does not exists, moodle/theme/YOUR_THEME/javascript
  • Copy file moodle/auth/joomdle/js/iframeResizer.contentWindow.min.js to moodle/theme/YOUR_THEME/javascript
  • Finally, add the new javascript file to your theme, by opening moodle/theme/YOUR_THEME/config.php and adding at the end:
    • $THEME->javascripts = array ( 'iframeResizer.contentWindow.min' );
  • or, if $THEME->javascripts is already defined in file:
    • $THEME->javascripts[] = 'iframeResizer.contentWindow.min';


After these steps, you should be able to have resizing iframe over different domains


NOTE: This is a new feature that has only been tested in a few sites, so please report any issues you may have with it.