FEATURE: Allow content at top and bottom of iframe

This commit is contained in:
Andrew O'Neil 2009-06-04 02:35:03 +00:00
parent 43ab1f81bb
commit d2345539c6
2 changed files with 10 additions and 3 deletions

View File

@ -4,7 +4,9 @@ class IFramePage extends Page {
static $db = array(
'IFrameUrl' => 'Text',
'DynamicHeight' => 'Boolean',
'FixedHeight' => 'Int'
'FixedHeight' => 'Int',
'AlternateContent' => 'HTMLText',
'BottomContent' => 'HTMLText'
);
function getCMSFields() {
@ -14,7 +16,10 @@ class IFramePage extends Page {
$fields->addFieldToTab('Root.Content.Main', new TextField('IFrameUrl', 'IFrame URL'));
//$fields->addFieldToTab('Root.Content.Main', new CheckboxField('DynamicHeight', 'Dynamically resize the IFrame height (this doesn\'t work if IFrame URL is on a different domain)'));
$fields->addFieldToTab('Root.Content.Main', new NumericField('FixedHeight', 'Fixed Height (in pixels)'));
$fields->addFieldToTab('Root.Content.Main', new HtmlEditorField('Content', 'Alternate Content'));
$fields->addFieldToTab('Root.Content.Main', new HtmlEditorField('Content', 'Content (appears above IFrame)'));
$fields->addFieldToTab('Root.Content.Main', new HtmlEditorField('BottomContent', 'Content (appears below IFrame)'));
$fields->addFieldToTab('Root.Content.Main', new HtmlEditorField('AlternateContent', 'Alternate Content (appears when user has IFrames disabled)'));
return $fields;
}

View File

@ -5,7 +5,9 @@
<div class="typography">
<h2>$Title</h2>
$Content
<iframe id="IFramePageIFrame" src="$IFrameUrl" $Height>
$Content
$AlternateContent
</iframe>
$BottomContent
</div>