Login | Join Now
  • Velocity Templates

    Product:
    CollabNet SourceForge Enterprise

    Component:
    Velocity Templates

    Summary:
    SourceForge parses a set of velocity templates that can be overridden with custom templates.


     

    Velocity Templates

    SourceForge parses a set of velocity templates that can be overridden with custom templates. The templates are in the SDK.

    After you unzip sf_44_sdk, the individual templates are in the sf_44_sdk/customization/ templates directory. If you want to add functionality to a template, you must move the default template from the sf_44_sdk in customization/templates and move it to <sourceforge>/sourceforge_home/ templates.

    The 'custom.vm', 'body_header.vm' and 'body_footer.vm' templates are blank by default and can safely be created without needing the default source.

    Remember to maintain the directory structure below “templates” when you copy the .vm file. For information about the Velocity Template Language, refer to the http://velocity.apache.org/ project.

    Note - For velocity template development, it may help to disable the velocity cache. Otherwise, you have to wait up to 10 seconds for the template to reload. To disable the cache, add the following line:

    sf.disableVelocityCache=true

    to the following file:

    <sourceforge>/sourceforge_home/etc/sourceforge_configuration.properties

    and restart SourceForge. Disabling the Velocity cache will affect performance and is not recommended for production systems.

    The following pages can be customized:
    • Home Page
    • Project Home Page
    • Custom page

    More documentation


    Community Support

    To discuss any SDK or API-related topics with other CollabNet SourceForge Enterprise users and CollabNet engineers,
    please visit the CollabNet SourceForge Enterprise API discussion forum.