seade 2003/09/02 00:22:10
Modified: xdocs/howto velocityonlylayout-howto.xml
Log:
Fix ordering of DefaultDoctype information.
Add new Styles code to the generated layout example.
Revision Changes Path
1.4 +16 -9 jakarta-turbine-2/xdocs/howto/velocityonlylayout-howto.xml
Index: velocityonlylayout-howto.xml
===================================================================
RCS file: /home/cvs/jakarta-turbine-2/xdocs/howto/velocityonlylayout-howto.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- velocityonlylayout-howto.xml 2 Sep 2003 06:25:49 -0000 1.3
+++ velocityonlylayout-howto.xml 2 Sep 2003 07:22:10 -0000 1.4
@@ -75,25 +75,25 @@
</p>
<source>
<![CDATA[
-services.VelocityService.velocimacro.library = macros/TurbineMacros.vm
+$page.DefaultDoctype
]]>
</source>
<p>
- to your TurbineResources.properties and it will pick up the
- TurbineMacros.vm in your Turbine jar. An example of how to use
- these macros follows.
+ to your templates to pick up the default doctype definition from
+ TurbineResources.properties and make it available as $page.DefaultDoctype.
</p>
<p>
Add the line
</p>
<source>
<![CDATA[
- $page.DefaultDoctype
+services.VelocityService.velocimacro.library = macros/TurbineMacros.vm
]]>
</source>
<p>
- to your templates to pick up the default doctype definition from
- TurbineResources.properties.
+ to your TurbineResources.properties and it will pick up the
+ TurbineMacros.vm in your Turbine jar. An example of how to use
+ these macros follows.
</p>
<p>
Here is a sample layout template that you can use:
@@ -108,7 +108,7 @@
$page.addScript($content.getURI("globalJavascriptCode.js"))
## build the HTML, HEAD, and BODY tags dynamically
- $page.DefaultDoctype
+ $page.DefaultDoctype
<html>
#TurbineHtmlHead()
<body #TurbineHtmlBodyAttributes() >
@@ -134,7 +134,7 @@
$page.addScript($content.getURI("globalJavascriptCode.js"))
## build the HTML, HEAD, and BODY tags dynamically
- $page.DefaultDoctype
+ $page.DefaultDoctype
<html>
<head>
#if($page.Title != "")
@@ -152,6 +152,13 @@
#if($styleSheet.Media != "") media="$styleSheet.Media" #end
#if($styleSheet.Title != "") title="$styleSheet.Title" #end
>
+ #end
+ #if ($page.Styles.size() > 0)
+ <style type="text/css">
+ #foreach( $style in $page.Styles )
+ $!style
+ #end
+ </style>
#end
#foreach($script in $page.Scripts)
<script type="text/javascript" src="$script"
language="JavaScript"></script>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]