Display Liferay Version in Liferay DXP 7.4 design fragment

51 views Asked by At

I'd like to show the Liferay version for example in a page footer fragment, but searching the web did not help. Is there any Liferay version variable I can use in a Liferay DXP 7.4 design fragment?

1

There are 1 answers

0
Gunnar On BEST ANSWER

Further web digging and testing did the trick.

In https://learn.liferay.com/w/dxp/site-building/developer-guide/reference/fragments/fragment-specific-tags-reference I found a hint regarding the syntax

${someUtil.someMethod(...)}

Since I'm in a Docker installation I have an env var

LIFERAY_RELEASE_VERSION=2023.q4.0

which I also see in the control panel as

env.LIFERAY_RELEASE_VERSION

So all I had to do in my fragment is

${propsUtil.get("env.LIFERAY_RELEASE_VERSION")}

to see 2023.q4.0 in the output.