Answer the question
In order to leave comments, you need to log in
How to sort with current date condition in collections modx table?
Hello. I have a rather banal problem that I can't solve.
There is a website that displays events.
There is an admin area where events are started, so that the manager is comfortable, I wrote the following plugin:
<?php
$e = & $modx->Event;
if ($e->name == 'OnDocFormSave') {
//для меропреятий из Афиши
if ($resource->get('template') == 2) {
$date = $resource->getTVValue('event_date');
$resource->set('unpub_date', $date);
$resource->save();
}
Answer the question
In order to leave comments, you need to log in
Which led to the fact that now they cannot be removed from publication, because otherwise they will not be visible to the average user on the site.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question