Fixed extra_requirements docs

This commit is contained in:
Ingo Schommer 2013-04-05 15:34:29 +02:00
parent bc6f18849f
commit 1dda9ae45f
3 changed files with 22 additions and 2 deletions

View File

@ -120,12 +120,27 @@ class LeftAndMain extends Controller implements PermissionProvider {
* Used mainly to work around the missing "lazy loading" functionality
* for getting css/javascript required after an ajax-call (e.g. loading the editform).
*
* YAML configuration example:
* <code>
* LeftAndMain:
* extra_requirements_javascript:
* mysite/javascript/myscript.js:
* </code>
*
* @config
* @var array
*/
private static $extra_requirements_javascript = array();
/**
* YAML configuration example:
* <code>
* LeftAndMain:
* extra_requirements_css:
* mysite/css/mystyle.css:
* media: screen
* </code>
*
* @config
* @var array See {@link extra_requirements_javascript}
*/

View File

@ -62,7 +62,12 @@ Paste the following content into a new file called `mysite/css/BookmarkedPages.c
.cms-bottom-bar a {color: #444444;}
Load the new CSS file into the CMS, by setting the `LeftAndMain.extra_requirements_css`
[configuration value](/topics/configuration) to 'mysite/css/BookmarkedPages.css'.
[configuration value](/topics/configuration).
:::yml
LeftAndMain:
extra_requirements_css:
mysite/css/BookmarkedPages.css:
## Create a "bookmark" flag on pages ##

View File

@ -69,7 +69,7 @@ to the `LeftAndMain.extra_requirements_javascript` [configuration value](/topics
:::yml
LeftAndMain
extra_requirements_javascript:
- 'mysite/javascript/MyLeftAndMain.Preview.js'
mysite/javascript/MyLeftAndMain.Preview.js:
In order to find out which configuration values are available, the source code
is your best reference at the moment - have a look in `framework/admin/javascript/LeftAndMain.Preview.js`.