使用 Asset Publisher 和标签的动态内容

发布于 2024-11-30 11:17:21 字数 334 浏览 4 评论 0原文

我很确定这是可以做到的,但我发现很少有关于如何正确执行此操作的文档。

我有几个与标签关联的网络内容片段。我想将 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

旧伤慢歌 2024-12-07 11:17:21

请参阅 TagNavigation 或 TagCloud portlet 以及它们如何构造其 URL - 据我所知,它们使用公共呈现参数。

See the TagNavigation or TagCloud portlet and how they construct their URLs - AFAIK they use public render parameters.

↙厌世 2024-12-07 11:17:21

您必须在网址 /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".

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文