Template:WEiFrame

From WikiEducator
Jump to: navigation, search



A template for pulling external web content into a course after it's been "snapshotted" to a suitable (where the person initiating the snapshot has admin permissions) WordPress site or subsite (in the case of a WordPress Multi-site implementation like [OERu's Course site](https://course.oeru.org).

Note, the external content will not be shown in the WikiEducator context, because MediaWiki (WikiEducator's underlying software platform) is rightly wary of iframed content, a capability which could be misused in a relatively unregulated environment like WikiEducator. Sensible, non-exploitative use of this template is the responsibility of whoever is initiating the snapshot of the content including this information.

Parameter

url
the url is the web address of the content to be pulled into the iframe - note, the server hosting this must be configured to allow the WordPress site within any X-Frame-Options setting.
width
the horizontal dimension of the viewport of the iframed content, using any appropriate CSS units like "px" (pixels - an absolute measure) or "%" (percent of available space) or "em" (based on width of average character). If not supplied, defaults to "100%" of the available width.
height
the vertical dimension of the viewport of the iframed content, also using any appropriate CSS units. If not supplied, defaults to "400px".
style
optional a list of ad hoc "inline" CSS style rules in the form rule1: value1; rule2: value2; etc. ... For more on CSS see Cascading Style Sheets.
classes
optional one or more CSS classes to associate with this iframe.
id
optional a CSS id to associate with this iframe.

Sample

Here're some sample template invocations for the examples shown below suitable for copy-and-pasting...

{{WEiFrame
|url=https://tech.oeru.org/2018-update-oeru-technology-stack#case-study
|style=font-weight: bold;
|height=200px
|width=100%
|classes=class1 class2
|id=id1
}}

And this is what they look like as one liners...

{{WEiFrame|url=https://tech.oeru.org/2018-update-oeru-technology-stack#case-study|width=100%|id=id1|style=font-style: italic;}}

{{WEiFrame|url=https://tech.oeru.org/2018-update-oeru-technology-stack#case-study|classes=class1 class2}}

Example

This is how the Sample templates above render in WikiEducator - it does not pull in the iFramed content due to MediaWiki's policy on not including iFrames due to security considerations - they will, however, appear, when the Wiki pages containing this template are snapshotted into the context of a WordPress site. You can see the exact syntax by clicking the [edit] link on this section!


100%
200px
font-weight: bold;
class1 class2
id1