简体   繁体   English

链接到资产发布者时无法访问Web内容的请求对象

[英]Unable to access web content's request object when linked to asset publisher

On adding a web content in an asset publisher, we are getting empty request object but if we add the same web content in web content display then we are able to see the request object. 在资产发布者中添加Web内容时,我们将获得空的请求对象,但是如果在Web内容显示中添加相同的Web内容,则可以看到该请求对象。

Here is what I tried: 这是我尝试过的:

  1. Create a web content and try to print $request object. 创建一个Web内容,然后尝试打印$ request对象。
  2. Add this web content into an asset publisher. 将此Web内容添加到资产发布者中。 We observe request object to be empty("{}"). 我们观察到请求对象为空(“ {}”)。
  3. Add the same content in web content display to validate. 在Web内容显示中添加相同的内容以进行验证。

My requirement is: I need the themeDisplay object which is available inside request object of "web content". 我的要求是:我需要在“ Web内容”的请求对象内可用的themeDisplay对象。

Any idea whether this is expected behavior? 知道这是否是预期的行为吗? Whether this is any possible workaround to achieve my requirement? 这是否可以解决我的要求?

Thanks in advance! 提前致谢!

Which Liferay you are using ? 您正在使用哪个Liferay? If you are using 6.2 then why don't use ADT? 如果您使用的是6.2,那么为什么不使用ADT? It contains ${themeDisplay} (FTL), $themeDisplay (VM) objects, or given below code (LR 6.1) also work. 它包含$ {themeDisplay} (FTL), $ themeDisplay (VM)对象或下面给出的代码(LR 6.1)也可以使用。 If you are using 6.1 then $request.theme-display will workout. 如果您使用的是6.1,则$ request.theme-display将进行锻炼。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM