Thanks, I am the developer. I like the sound of scheduled task to remove
any paragraphs that have expired.
Many thanks
Jan Haderka wrote:
Oops, sorry I mis-read your original request.
Bit trickier (like all multiple answer questions :D ), but yes.
First activate the page with all the content.
Once activated, remove the paragraph and set the "startDate" property
on the page to be the date when you want to remove the paragraph and
activate again. The activation of page w/o the paragraph will wait
until the startDate occurs and will proceed only at that date. Once
the version of the page w/o paragraph is activated the paragraph will
disappear from public site.
Slightly more straightforward but cleaner solution, if you are the
content developer:
- add the "validUntilDate" property to your paragraph dialog and
- have your template check the date every time the page is rendered
and not render anything if the date passed.
Of course to make this work reliably you would have to exclude pages
using such paragraph from the cache.
Now there is possibly 3rd way (tho how good/bad this is I leave up to
you):
- add validUntilDate property in the paragraph
- create scheduled task to traverse all the site content periodically
and remove all paragraphs with given date once the date has passed
- run this on both author and public
And just for sake of completeness (again useful only in special
situations):
- have such paragraph as special type in data module
- have paragraph template load the info from data module
- create ImportHandler for given type that will not really import
anything, but instead will remove all content that is already past its
validUntilDate
- and configure import handler to activate the changes automatically.
... there might be few more ways of doing this, like using aggregation
(see Events/NewsOverview pages in STK demo project) and similar.
HTH,
Jan
On May 10, 2010, at 12:47 PM, Peter Flood wrote:
I don't want to deactivate the whole page, just a single paragraph
(eg remove a single paragraph from the page, I know that paragraphs
aren't activated/deactivated individually), is there any way to make
that possible?
You can do so when using workflow to activate the content. Look in
default workflow definition - if the "endDate" property exists in
the page, content will be deactivated at that date.
In some older versions of Magnolia you could specify the date via
page properties, in the newer ones you can do so in workflow
activation dialog. And I'm afraid in some versions the field was not
defined by default, but you can easily add it to the page properties.
HTH,
Jan
On May 10, 2010, at 8:34 AM, Peter Flood wrote:
Is there a way to have a paragraph automatically removed from a
page on a date in the future (specified when paragraph created)?
For example if I had a paragraph advertising a special offer, I
want the special offer to be removed from the page on a specified
date in the future.
Thanks
------------------------------------------------------------------------
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]
<mailto:[email protected]>>
----------------------------------------------------------------
-
Best regards,
Jan Haderka, PhD.
Magnolia International Ltd.
http://www.magnolia-cms.com <http://www.magnolia-cms.com/>
http://twitter.com/magnolia_cms
You should join us on Facebook:
http://facebook.com/Magnolia
--------------------------------------
Magnolia® - Simple Open-Source Content Management
------------------------------------------------------------------------
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------
------------------------------------------------------------------------
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]
<mailto:[email protected]>>
----------------------------------------------------------------
-
Best regards,
Jan Haderka, PhD.
Magnolia International Ltd.
http://www.magnolia-cms.com
http://twitter.com/magnolia_cms
You should join us on Facebook:
http://facebook.com/Magnolia
--------------------------------------
Magnolia® - Simple Open-Source Content Management
------------------------------------------------------------------------
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------