Foren

Dynamic content using Asset Publisher and tags

Alan Gardner, geändert vor 12 Jahren.

Dynamic content using Asset Publisher and tags

New Member Beiträge: 2 Beitrittsdatum: 17.08.11 Neueste Beiträge
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.
thumbnail
Sagar A Vyas, geändert vor 12 Jahren.

RE: Dynamic content using Asset Publisher and tags

Liferay Master Beiträge: 679 Beitrittsdatum: 17.04.09 Neueste Beiträge
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.


Hi Alan,

You can filter web content by using Filter also.

Click on configuration of Asset publisher >> Go To the Filter area as per attached diagram and select your tag.

Thanks,
Sagar Vyas
Alan Gardner, geändert vor 12 Jahren.

RE: Dynamic content using Asset Publisher and tags

New Member Beiträge: 2 Beitrittsdatum: 17.08.11 Neueste Beiträge
Thanks Sagar, but the unanswered question is not how to use the filter - but how to pass a tag value via a parameter in the URL string that the filter can then use.

I'm not finding documentation on whether the URL pattern the Asset Publisher needs. Is it looking for a parameter such as a key value like "tag=fish" (and if so, what is the key) or a restful pattern such as "/tag/fish/" or something else entirely.
thumbnail
jelmer kuperus, geändert vor 12 Jahren.

RE: Dynamic content using Asset Publisher and tags

Liferay Legend Beiträge: 1191 Beitrittsdatum: 10.03.10 Neueste Beiträge
The feature you are referring to is called "compiler tags"

Suppose your page is on

http://www.site.com/mypage

then you should be able to filter on the featured tag like this

http://www.site.com/mypage/tags/featured

However if you are using the community edition. This feature is broken

http://issues.liferay.com/browse/LPS-14915
thumbnail
Sagar A Vyas, geändert vor 12 Jahren.

RE: Dynamic content using Asset Publisher and tags

Liferay Master Beiträge: 679 Beitrittsdatum: 17.04.09 Neueste Beiträge
Hi Jelmer,

Thanks for you reply.

The URL you have mention above its not accessible.

1) http://www.site.com/mypage
2) http://www.site.com/mypage/tags/featured

Please do verify.

Thanks,
Sagar Vyas
thumbnail
Ravi Kumar Gupta, geändert vor 12 Jahren.

RE: Dynamic content using Asset Publisher and tags

Liferay Legend Beiträge: 1302 Beitrittsdatum: 24.06.09 Neueste Beiträge
Sagar, I guess Jelmer was just setting an example to explain compiler tags. emoticon
thumbnail
Sagar A Vyas, geändert vor 12 Jahren.

RE: Dynamic content using Asset Publisher and tags

Liferay Master Beiträge: 679 Beitrittsdatum: 17.04.09 Neueste Beiträge
Opssss Sorry Jelmer i was thinking something else :p

Thanks Ravi for guide me. Really need a cup of tea emoticon