Template:EmbedLiveSample

  • Revision slug: Template:EmbedLiveSample
  • Revision title: Template:EmbedLiveSample
  • Revision id: 328963
  • Created:
  • Creator: Jeremie
  • Is current revision? No
  • Comment

Revision Content

<% // Embeds a live sample given the ID of its header block. // // Parameters: // $0 - The ID of the header block containing the sample // $1 - The width of the iframe (optional) // $2 - The height of the iframe (optional) var widthHeight = ""; if ($1 && $2) { widthHeight = "width='" + $1 + "' height='" + $2 + "' "; } %>

Revision Source

<%
// Embeds a live sample given the ID of its header block.
//
// Parameters:
//  $0 - The ID of the header block containing the sample
//  $1 - The width of the iframe (optional)
//  $2 - The height of the iframe (optional)

var widthHeight = "";
if ($1 && $2) {
    widthHeight = "width='" + $1 + "' height='" + $2 + "' ";
}
%>
<iframe  frameborder="0" style="border:1px solid #EFEFEF;" <%=widthHeight%>src="<%= template('LiveSampleURL', [$0]) %>"></iframe>
Revert to this revision