使用 Asset Publisher 和标签的动态内容
我很确定这是可以做到的,但我发现很少有关于如何正确执行此操作的文档。
我有几个与标签关联的网络内容片段。我想将 Asset Publisher portlet 添加到页面,该页面根据 URL 中是否存在标签来显示正确的 Web 内容。因此,如果 URL 是:domain.com/public/site?tag=fish,那么它会使用 Asset Publisher 过滤器提供标记为“fish”的 Web 内容。
URL 的正确语法是什么?我在论坛中看到:
/public/site/tags/fish/ 并且我将其视为参数 ?tag=fish 但这些似乎都不起作用。我正在使用 Liferay 6。
I'm pretty sure this can be done, but am finding little documentation on how to do it correctly.
I have several Web Content pieces that I've associated with tags. I'd like to add an Asset Publisher portlet to a page that displays the correct Web Content based on if a tag exists in the URL. So if the url is: domain.com/public/site?tag=fish then it serves up the Web Content tagged "fish"using the Asset Publisher filter.
What is the correct syntax for the URL? I've seen in forums:
/public/site/tags/fish/ and I've seen it as a parameter ?tag=fish but neither of these seem to work. I'm using Liferay 6.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
请参阅 TagNavigation 或 TagCloud portlet 以及它们如何构造其 URL - 据我所知,它们使用公共呈现参数。
See the TagNavigation or TagCloud portlet and how they construct their URLs - AFAIK they use public render parameters.
您必须在网址
/web/mysite/mypage/tags/mytag
中使用此语法它适用于 Liferay 5.2.3。当然,您需要社区“mysite”的页面“mypage”上的资产发布器以及一些带有“mytag”标签的内容。
You have to use this syntax in the url
/web/mysite/mypage/tags/mytag
It works for Liferay 5.2.3. Of course you need an Asset Publisher on the page "mypage" of the community "mysite" and some content which is tagged with "mytag".