Information about Confluence, such as the version number, build number and build date, can be retrieved from the GeneralUtil object.
You can use GeneralUtils public accessors to retrieve public static variables:
1 2String versionNumber = GeneralUtil.getVersionNumber();
1 2String buildNumber = GeneralUtil.getBuildNumber();
1 2String buildDate = GeneralUtil.getBuildDateString();
or
1 2Date buildDate = GeneralUtil.getBuildDate();
1 2$generalUtil.versionNumber $generalUtil.buildNumber $generalUtil.buildDateString
For instance, part of the Confluence footer is generated in the footer.vm file:
1 2(Version: $generalUtil.versionNumber Build:#$generalUtil.buildNumber $generalUtil.buildDateString)
User macros can include the Velocity markup given above. For example, create a user macro called 'version' with no body and the contents:
1 2$generalUtil.versionNumber
You can use this user macro in a page like this:
1 2Congratulation, you're running Confluence version {version}!
Rate this page: