publishDate and removeDate Calculation
2 posts by 2 authors in: Forums > CMS Builder
Last Post: August 14, 2014 (RSS)
By Perchpole - August 8, 2014
Hi, All -
I'm trying to make good use of the removeDate function in order to create news items that will automatically expire after 6 months. I'm using the following code to "Specify a Custom Date" in the dafault field:
now 00:00:00 + 6 month
It works perfectly.
The only issue is how do I make it work for news items that have a publish date? I don't want the item to expire 6 months after it was created but 6 months after it was published!
I need some code along the lines of:
publishDate 00:00:00 + 6 month
Can it be made to work?
Perch
Hey Perch,
I've had a look, but I don't think this will be possible without creating a custom plugin that uses Jquery to update any removeDates based on the publishDates field.
This could be done using the admin_head plugin hook to add the required jQuery code to the header.
Let me know if you have any questions.
Thanks!
Greg
PHP Programmer - interactivetools.com