Sorry, made a mistake on the site.xml (I was playing around with it
while composing the original email).
It should be this...
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/DECORATION/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.0 http://maven.apache.org/xsd/decoration-1.0.0.xsd
">
<custom>
<siteOwner>
<name>FooBar</name>
</siteOwner>
</custom>
<body>
<menu ref="parentProject" inherit="top"/>
<menu ref="modules" inherit="top" inheritAsRef="false"/>
</body>
</project>
Regards,
Tom Bollwitt
SYSTEMS ENGINEER
Mersoft
9300 W. 110th St.
Building 55, Suite 350
Overland Park, KS 66210
913-871-6200
tlbollw...@mersoft.com
On Jun 3, 2009, at 11:55 AM, Tom Bollwitt wrote:
I am creating a custom Velocity template to use with a skin for site
generation.
My site.xml has the following...
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/DECORATION/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.0 http://maven.apache.org/xsd/decoration-1.0.0.xsd
">
<custom>
<siteOwner>FooBar</siteOwner>
</custom>
<body>
<menu ref="modules" inherit="top" inheritAsRef="false"/>
</body>
</project>
My velocity template has the following...
$decoration.custom
$decoration.custom.siteOwner
$decoration.custom.siteOwner.name
The template renders as...
FooBar $decoration.custom.siteOwner
$decoration.custom.siteOwner.name
I would have expected $decoration.custom.siteOwner.name to be the
one to work. This causes a problem because if I need multiple custom
tags there is no way to reference them individually.
so this....
<custom>
<siteOwner>FooBar</siteOwner>
<MyCustomTag>some value</MyCustomTag>
</custom>
ends up rendering as this...
FooBar some value $decoration.custom.siteOwner
$decoration.custom.siteOwner.name
I have not been able to find any docs on proper usage for the
<custom> site.xml tags. Can anyone provide a little insight to the
proper usage?
Regards,
Tom Bollwitt
Mersoft
tlbollw...@mersoft.com