如何在 Liferay Freemarker 中获取显示页面的资产条目
如何在显示页面内的 Freemarker(片段、小部件模板、Web 内容模板等)中获取资产条目。
How can I get the Asset Entry in a Freemarker (a Fragment, Widget Template, Web Content Template, etc) inside a Display Page.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用
Request
全局变量中的INFO_ITEM_DETAILS
对象来获取资产className
和classPK
,然后恢复您的使用AssetEntryLocalService
显示页面资源You can use
INFO_ITEM_DETAILS
object fromRequest
global variable, to get the AssetclassName
andclassPK
, and then recover your Display Page Asset withAssetEntryLocalService