update readme and docs for SS4 specific infos

This commit is contained in:
Dylan Wagstaff 2017-11-23 10:47:30 +13:00
parent df6bd2107e
commit ef1a6322a7
3 changed files with 16 additions and 25 deletions

1
.gitignore vendored
View File

@ -1 +0,0 @@
.DS_Store

View File

@ -1,20 +1,9 @@
# IFrame module # IFrame module
[![Build Status](https://travis-ci.org/silverstripe-labs/silverstripe-iframe.svg?branch=master)](https://travis-ci.org/silverstripe-labs/silverstripe-iframe) [![Build Status](https://travis-ci.org/silverstripe/silverstripe-iframe.svg?branch=master)](https://travis-ci.org/silverstripe/silverstripe-iframe)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/silverstripe-labs/silverstripe-iframe/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/silverstripe-labs/silverstripe-iframe/?branch=master) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/silverstripe/silverstripe-iframe/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/silverstripe/silverstripe-iframe/?branch=master)
[![Build Status](https://scrutinizer-ci.com/g/silverstripe-labs/silverstripe-iframe/badges/build.png?b=master)](https://scrutinizer-ci.com/g/silverstripe-labs/silverstripe-iframe/build-status/master) [![codecov](https://codecov.io/gh/silverstripe/silverstripe-iframe/branch/master/graph/badge.svg)](https://codecov.io/gh/silverstripe/silverstripe-iframe)
[![codecov.io](https://codecov.io/github/silverstripe-labs/silverstripe-iframe/coverage.svg?branch=master)](https://codecov.io/github/silverstripe-labs/silverstripe-iframe?branch=master) [![Version](http://img.shields.io/packagist/v/silverstripe/iframe.svg?style=flat)](https://packagist.org/packages/silverstripe/silverstripe-iframe)
[![License](http://img.shields.io/packagist/l/silverstripe/iframe.svg?style=flat)](LICENSE.md)
[![Latest Stable Version](https://poser.pugx.org/silverstripe/iframe/version)](https://packagist.org/packages/silverstripe/iframe)
[![Latest Unstable Version](https://poser.pugx.org/silverstripe/iframe/v/unstable)](//packagist.org/packages/silverstripe/iframe)
[![Total Downloads](https://poser.pugx.org/silverstripe/iframe/downloads)](https://packagist.org/packages/silverstripe/iframe)
[![License](https://poser.pugx.org/silverstripe/iframe/license)](https://packagist.org/packages/silverstripe/iframe)
[![Monthly Downloads](https://poser.pugx.org/silverstripe/iframe/d/monthly)](https://packagist.org/packages/silverstripe/iframe)
[![Daily Downloads](https://poser.pugx.org/silverstripe/iframe/d/daily)](https://packagist.org/packages/silverstripe/iframe)
[![Dependency Status](https://www.versioneye.com/php/silverstripe:iframe/badge.svg)](https://www.versioneye.com/php/silverstripe:iframe)
[![Reference Status](https://www.versioneye.com/php/silverstripe:iframe/reference_badge.svg?style=flat)](https://www.versioneye.com/php/silverstripe:iframe/references)
![codecov.io](https://codecov.io/github/silverstripe-labs/silverstripe-iframe/branch.svg?branch=master)
## Introduction ## Introduction
@ -23,16 +12,18 @@ custom code.
## Requirements ## Requirements
* SilverStripe 3.0 * SilverStripe ^4.0
**Note:** For a SilverStripe 3.x compatible version, please use [the 1.x release line](https://github.com/silverstripe/silverstripe-iframe/tree/1.0).
## Installation ## Installation
Copy the iframe directory into your SilverStripe project, then append dev/build?flush=all to the website URL in your Run `composer require silverstripe/iframe`, then append dev/build?flush=all to the website URL in your
browser. e.g. http://mysite.com/dev/build?flush=all browser. e.g. http://mysite.test/dev/build?flush=all
## Instructions ## Instructions
For usage instructions see [user manual](docs/en/userguide/index.md). For usage instructions see the [user manual](docs/en/userguide/index.md).
## Contributing ## Contributing

View File

@ -14,7 +14,7 @@ This module provides a page type that you can use to embed IFrames in your websi
## Creating an IFrame ## Creating an IFrame
IFrame pages are created like any other page. When you create a new page, selected the **IFrame Page** from the list of available page types. IFrame pages are created like any other page. When you create a new page, selected the **I Frame Page** from the list of available page types.
There are a few new fields on an IFrame page. There are a few new fields on an IFrame page.
@ -22,12 +22,13 @@ The most important is *Iframe URL*: this is the URL that wish you display inside
path (ie, http://example.com/) or a relative path (ie, /about-us/). If it is a relative path then it will be assumed to path (ie, http://example.com/) or a relative path (ie, /about-us/). If it is a relative path then it will be assumed to
be from the root of your site (ie, http://mysite.com/about-us/). be from the root of your site (ie, http://mysite.com/about-us/).
*Auto height* will change the height of the IFrame to match the total height of the remote page. This will only work if *Auto height* will change the height of the IFrame to match the total height of the remote page.
the remote page is hosted on the same domain. _This will only work if the remote page is hosted on the same domain._
If you check *Auto width* the IFrame will take up the entire width of the content area that it is in. If you check *Auto width* the IFrame will take up the entire width of the content area that it is in.
You can manually set the height and width with the *Fixed height* and *Fixed width* fields. You can manually set the height and width with the *Fixed height* and *Fixed width* fields.
The Auto width/height options must not be enabled for these fields to work.
The *Content* field has been broken up into three separate fields: one to display above the IFrame, one to display The *Content* field has been broken up into three separate fields: one to display above the IFrame, one to display
beneath the IFrame, and another to display instead of the IFrame if the user has disabled them. beneath the IFrame, and another to display instead of the IFrame if the user has disabled them.
@ -37,4 +38,4 @@ beneath the IFrame, and another to display instead of the IFrame if the user has
A common test case is to enter "http://google.com" as the IFrame URL. This won't work! Google's website has the A common test case is to enter "http://google.com" as the IFrame URL. This won't work! Google's website has the
*X-Frame-Options: SAMEORIGIN* header which means that it can only be displayed in an IFrame with a bit of technical *X-Frame-Options: SAMEORIGIN* header which means that it can only be displayed in an IFrame with a bit of technical
hackery. If you experience a white box displaying with any other website, check if it has that option set in the hackery. If you experience a white box displaying with any other website, check if it has that option set in the
header. header.