From fc15fd5d200f3abc221ad331474cd6a2f666d145 Mon Sep 17 00:00:00 2001 From: rjy7 Date: Fri, 25 Jun 2010 17:44:51 +0000 Subject: [PATCH] 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. --- themes/vivo-basic/templates/page/default.ftl | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/themes/vivo-basic/templates/page/default.ftl b/themes/vivo-basic/templates/page/default.ftl index ffd25044..0222e344 100644 --- a/themes/vivo-basic/templates/page/default.ftl +++ b/themes/vivo-basic/templates/page/default.ftl @@ -38,13 +38,21 @@ -<#-- Three ways to add a stylesheet: +<#-- +Three ways to add a stylesheet: A. In theme directory: ${stylesheets.addFromTheme("/sample.css"); -${stylesheets.add(stylesheetDir + "/sample.css")} +${stylesheets.add(themeStylesheetDir + "/sample.css")} B. Any location -${stylesheets.add("/edit/forms/css/sample.css"} +${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)"} --> \ No newline at end of file