如何在Web Content 模板中获取主题显示(Liferay 7.x)

How can it get the theme display in a Web Content template (Liferay 7.x)

我需要访问 Liferay 7.3 Web 内容模板中的 theme_display。

我尝试了以下代码(来自 Liferay Portal 6.2 - How to get theme_display in Web Content Template)但它不起作用(Liferay 中的更改 7.x)我猜。

<#assign
serviceContextThreadLocal = staticUtil["com.liferay.portal.kernel.service.ServiceContextThreadLocal"]
themeDisplay = serviceContextThreadLocal.getServiceContext().getThemeDisplay()
/>

我的目标是动态访问登录 URL。我的主题中有以下有效代码,但我现在需要它来处理某些特定内容。

theme_display.getURLSignIn()

它应该只适用于 ${themeDisplay.getURLSignIn()}。 我用它蘸了7.3 此外,以下要点可能会有所帮助:https://gist.github.com/bmvakili/2e83d1b73964d14d873ba5486bc28dd5