mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Docs: Consistent arg quoting in <% require %> (#1614)
This commit is contained in:
parent
9bd9b60576
commit
31e8ec3795
@ -25,9 +25,9 @@ element, so you can define 'screen' or 'print' for example.
|
||||
If you do not want to touch the PHP (for example you are constructing a generic theme) then you can include a file via
|
||||
the templates
|
||||
|
||||
<% require css(cms/css/TreeSelector.css) %>
|
||||
<% require themedCSS(TreeSelector) %>
|
||||
<% require javascript(cms/javascript/LeftAndMain.js) %>
|
||||
<% require css("cms/css/TreeSelector.css") %>
|
||||
<% require themedCSS("TreeSelector") %>
|
||||
<% require javascript("cms/javascript/LeftAndMain.js") %>
|
||||
|
||||
## Combining Files
|
||||
|
||||
|
@ -15,7 +15,7 @@ Here is a very simple template:
|
||||
<head>
|
||||
<% base_tag %>
|
||||
<title>$Title</title>
|
||||
<% require themedCSS(screen) %>
|
||||
<% require themedCSS("screen") %>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
@ -122,7 +122,7 @@ You can also perform includes using the Requirements Class via the template cont
|
||||
[Includes in Templates](requirements#including_inside_template_files) for more details and examples.
|
||||
|
||||
:::ss
|
||||
<% require themedCSS(LeftNavMenu) %>
|
||||
<% require themedCSS("LeftNavMenu") %>
|
||||
|
||||
### Including CSS and JavaScript files (a.k.a "Requirements")
|
||||
|
||||
|
@ -28,7 +28,7 @@ In your controller (e.g. `mysite/code/Page.php`):
|
||||
Or in your template (e.g. `themes/yourtheme/templates/Page.ss`):
|
||||
|
||||
:::ss
|
||||
<% require css(mymodule/css/my.css) %>
|
||||
<% require css("mymodule/css/my.css") %>
|
||||
|
||||
Management through the `Requirements` class has the advantage that modules can include their own CSS files without modifying
|
||||
your template. On the other hand, you as a template developer can "block" or change certain CSS files that are included from
|
||||
|
@ -123,7 +123,7 @@ By standard SilverStripe uses 3 CSS Files for your site -
|
||||
* **typography.css** contains the styling for the text/fonts/links (used in both front and back ends)
|
||||
* **form.css** styling for forms.
|
||||
|
||||
You can add more stylesheets using the template tag `<% require themedCSS(filename) %>`, which will load filename.css from
|
||||
You can add more stylesheets using the template tag `<% require themedCSS("filename") %>`, which will load filename.css from
|
||||
your css directory.
|
||||
|
||||
Note: If you're using a default install of Silverstripe and notice that you're getting layout.css, typography.css and
|
||||
|
Loading…
Reference in New Issue
Block a user