mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Fixed extra_requirements docs
This commit is contained in:
parent
bc6f18849f
commit
1dda9ae45f
@ -120,12 +120,27 @@ class LeftAndMain extends Controller implements PermissionProvider {
|
|||||||
* Used mainly to work around the missing "lazy loading" functionality
|
* Used mainly to work around the missing "lazy loading" functionality
|
||||||
* for getting css/javascript required after an ajax-call (e.g. loading the editform).
|
* 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
|
* @config
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
private static $extra_requirements_javascript = array();
|
private static $extra_requirements_javascript = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* YAML configuration example:
|
||||||
|
* <code>
|
||||||
|
* LeftAndMain:
|
||||||
|
* extra_requirements_css:
|
||||||
|
* mysite/css/mystyle.css:
|
||||||
|
* media: screen
|
||||||
|
* </code>
|
||||||
|
*
|
||||||
* @config
|
* @config
|
||||||
* @var array See {@link extra_requirements_javascript}
|
* @var array See {@link extra_requirements_javascript}
|
||||||
*/
|
*/
|
||||||
|
@ -62,7 +62,12 @@ Paste the following content into a new file called `mysite/css/BookmarkedPages.c
|
|||||||
.cms-bottom-bar a {color: #444444;}
|
.cms-bottom-bar a {color: #444444;}
|
||||||
|
|
||||||
Load the new CSS file into the CMS, by setting the `LeftAndMain.extra_requirements_css`
|
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 ##
|
## Create a "bookmark" flag on pages ##
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ to the `LeftAndMain.extra_requirements_javascript` [configuration value](/topics
|
|||||||
:::yml
|
:::yml
|
||||||
LeftAndMain
|
LeftAndMain
|
||||||
extra_requirements_javascript:
|
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
|
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`.
|
is your best reference at the moment - have a look in `framework/admin/javascript/LeftAndMain.Preview.js`.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user