Changed template variable stylesheetDir to themeStylesheetDir for clarity. Added examples of how to add a script from a body template. Pass themedir to ScriptList object.
This commit is contained in:
parent
2ada3b7c35
commit
df683191cf
4 changed files with 30 additions and 6 deletions
|
@ -50,3 +50,4 @@
|
|||
<@dump var="urls" />
|
||||
<@dump var="fruit" />
|
||||
<@dumpDataModel />
|
||||
|
||||
|
|
|
@ -36,3 +36,22 @@
|
|||
<#include "partials/scripts.ftl">
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<#--
|
||||
Three ways to add a stylesheet:
|
||||
|
||||
A. In theme directory:
|
||||
${stylesheets.addFromTheme("/sample.css");
|
||||
${stylesheets.add(themeStylesheetDir + "/sample.css")}
|
||||
|
||||
B. Any location
|
||||
${stylesheets.add("/edit/forms/css/sample.css)"}
|
||||
|
||||
To add a script:
|
||||
|
||||
A. In theme directory:
|
||||
${scripts.addFromTheme("/sample.js");
|
||||
|
||||
B. Any location
|
||||
${scripts("/edit/forms/js/sample.js)"}
|
||||
-->
|
Loading…
Add table
Add a link
Reference in a new issue