0

A site owner wants to differentiate between semantically different dates of articles published on their Drupal site as follows:

  1. Editorial changes on an article will NOT create a new revision.
  2. Content changes (e.g. updates, new paragraphs, etc.) WILL create a new revision.
  3. Order of display (e.g. on overview pages) should be done by revision date or publication date, whichever is more recent
  4. Articles should always display the most recent version (i.e. to reflect editorial changes)

I don't understand the logic behind the various dates provided by core Drupal 8, and how I could use them to implement what the customer wants.

For better understanding, here is an example:

  • On 1 May 2019, Article 1 was written and published in one go, and has never been changed since.
  • On 12 May, Article 2 was published after it was started on 10 May.
  • On 15 May, Article 3 was written and published.
  • On 19 May, Article 3 received editorial changes without a new revision.
  • On 21 May, Article 2 was updated with more content, thus creating a new revision.

The (descending) order in which these articles shall be displayed is:

  1. Article 2 - 12 May 2019 (Updated on 21 May 2019)
  2. Article 3 - 15 May 2019
  3. Article 1 - 1 May 2019

How can I achieve that with the least amount of custom code or modules to be used? Ideally the solution would entail only core Drupal views (however complex).

  • You can opt to create a new revision or not right on the edit form. – Kevin May 21 at 12:27
  • Yes I know that, and that's what the client wants to use. But it doesn't answer the question... – MDr May 21 at 12:29
  • In Views, add updated date in sort and move it/rearrange it above the default sort of created date. Not sure if this will do, but worth a try. – No Sssweat May 21 at 19:47
  • Thanks but tried that already. This approach orders articles by "changed on" date, which would put editorial changes before proper revisions - which is not what the client wants. – MDr May 22 at 7:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.