掲示板

Conditional "Display/Expiration date" in WCM

thumbnail
13年前 に Milen Dyankov によって更新されました。

Conditional "Display/Expiration date" in WCM

Regular Member 投稿: 171 参加年月日: 09/09/23 最新の投稿
Hi,

today I faced a requirement which made me thing of possible improvement in Liferay's WCM module. But let me shortly describe the use case first.

There is a financial portal providing important marketplace related information to its members. The portal members are divided into groups (say "key account customers", "enterprise customers" and "regular customers"). The requirement is that any information (web content) published should be available immediately for all "key account customers", then "enterprise customers" will be able to see it with some delay (say 30 min) and "regular customers" will get access even later (say next day/week).

While I'm wrapping my head around how to achieve this without digging too deep into Liferay's internals I thought it would be nice if Liferay could provide conditional "Display/Expiration date" in WCM. For example I can imagine implementation similar to how tag and category filters are handled in AssetPublisher's configuratin. It could be role based, meaning that besides global display/expiration date user can add conditions saying for role A display date is X and expiration date is Z, for role B ....

Do you thing this makes sense? Or may be this can be implemented in some other way?

Also any ideas how to implement such feature in Liferay 6.0.5 are highly appreciated. I was thinking about using custom attibutes, structures and templates to "manually" prevent displaying given web content before configured delay time has passed. However such approach does not solve the problem in content lists and search results.
thumbnail
13年前 に Jorge Ferrer によって更新されました。

RE: Conditional "Display/Expiration date" in WCM

Liferay Legend 投稿: 2871 参加年月日: 06/08/31 最新の投稿
Hi Milen,

I think it is an interesting idea. I can't think of an easy way to implement it though. There are at least the following parts to do it:
  • Let the content author specify several display dates or expiration dates and a role to which each applies
  • Create an scheduled task that periodically check these dates and saves in the database somehow which roles can currently view the content . This is necessary to make the queries for visible content easier and thus offer good performance
  • Create database queries that can filter in or out web content based on the result of the scheduled task above.


I'm not sure what would be the best way in which the scheduled task can set which roles can view or not which content. One way is to add several new tables, but this could get messy. Another option would be to reuse the permission system, which I think would be easier, but I'm not sure if it would fulfill all the requirements.

I hope this helps get you started. If you are able to make this work I would of course be interested in looking at it if you would like to contribute it.
thumbnail
7年前 に Madhusudan Aggarwal によって更新されました。

RE: Conditional "Display/Expiration date" in WCM

New Member 投稿: 8 参加年月日: 14/11/24 最新の投稿
Milen,

Were you able to implement this feature request.
Any info would help.

Thanks
MADHU
thumbnail
7年前 に Milen Dyankov によって更新されました。

RE: Conditional "Display/Expiration date" in WCM

Expert 投稿: 310 参加年月日: 12/10/30 最新の投稿
To fully honest with you - I don't remember how we solved that. It was over 5 years ago. I don't have any code that I can share and it was not implemented as Liferay OOTB feature. That said, nowdays it could be perhaps easier to solve it with Audience Targeting.
thumbnail
7年前 に David H Nebinger によって更新されました。

RE: Conditional "Display/Expiration date" in WCM

Liferay Legend 投稿: 14914 参加年月日: 06/09/02 最新の投稿
Or perhaps drools?