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






Reply via email to