Hide content after 2 weeks

I want some content (a certain content type) to be hidden after two weeks.
I would also like a mail to be sent to the person that added it the same day it is hidden / changed workflow state.

Is there already some add on that does this.

That's a small script with a catalog search, manipulation of the workflow state and sending out some email...

If there was an add-on it might have (more) useful functionality … like a control panel to change 14 days to 16 when the customer suddenly changes his mind (and other things I have not thought about yet)

I just did some testing yesterday using 'expires' (or expiration? can't remember) on the date tab.

Seems that portal_catalog queries will automatically filter out content that is expired by checking that field.

So, if you could default a content type expiration to "two weeks from now" you might have exactly what you want.

It doesn't change the workflow state tho. and I'm not sure if there is an event that triggers - probably not.

It does, however, put an "expired" tag on the content in the "contents" view of the parent folder - which is a nice eye-catcher.

1 Like
1 Like

Not every tiny functionality needs yet another tiny package and configuration or whatever.

We often put such tiny code fragements into scripts and run them bin/instance run script.py and cron against the ZEO server. Easy to maintain, easy to configure, easy to debug instead of dealing with all consequences of putting mini functonality into a dedicated Plone package.


I've got something like that to do myself, and had planned to use https://github.com/collective/collective.timedevents (with a cronjob in my case) - no controlpanel, but as I understand it stops events being triggered too often

Flexible using workflows states https://github.com/collective/collective.wfeffectiverange