Foros de discusión

Conditional "Display/Expiration date" in WCM

thumbnail
Milen Dyankov, modificado hace 13 años.

Conditional "Display/Expiration date" in WCM

Regular Member Mensajes: 171 Fecha de incorporación: 23/09/09 Mensajes recientes
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
Jorge Ferrer, modificado hace 13 años.

RE: Conditional "Display/Expiration date" in WCM

Liferay Legend Mensajes: 2871 Fecha de incorporación: 31/08/06 Mensajes recientes
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
Madhusudan Aggarwal, modificado hace 8 años.

RE: Conditional "Display/Expiration date" in WCM

New Member Mensajes: 8 Fecha de incorporación: 24/11/14 Mensajes recientes
Milen,

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

Thanks
MADHU
thumbnail
Milen Dyankov, modificado hace 8 años.

RE: Conditional "Display/Expiration date" in WCM

Expert Mensajes: 310 Fecha de incorporación: 30/10/12 Mensajes recientes
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
David H Nebinger, modificado hace 8 años.

RE: Conditional "Display/Expiration date" in WCM

Liferay Legend Mensajes: 14919 Fecha de incorporación: 2/09/06 Mensajes recientes
Or perhaps drools?