From d2345539c623387974833f7d173d74e2e6aaeb22 Mon Sep 17 00:00:00 2001 From: Andrew O'Neil Date: Thu, 4 Jun 2009 02:35:03 +0000 Subject: [PATCH] FEATURE: Allow content at top and bottom of iframe --- code/IFramePage.php | 9 +++++++-- templates/Layout/IFramePage.ss | 4 +++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/code/IFramePage.php b/code/IFramePage.php index cd7b8d5..4957a82 100644 --- a/code/IFramePage.php +++ b/code/IFramePage.php @@ -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; } diff --git a/templates/Layout/IFramePage.ss b/templates/Layout/IFramePage.ss index d44ea93..71c0010 100644 --- a/templates/Layout/IFramePage.ss +++ b/templates/Layout/IFramePage.ss @@ -5,7 +5,9 @@

$Title

+ $Content + $BottomContent