2

I have a (growing) number of articles. I want to display one on the homepage as article of the week, although that week will probably be a day in the beginning and a month later on. I also want a specific editor be able to choose which of those articles will be the chosen one for a given time period. There will only be one chosen article for any given time. What is the best way to do this (preferably without programming)?

I first thought of creating a vocabulary (with a date field and an entity reference to an article field) for this where the editor can simply add days/weeks/months as they come and select from the articles. The bad part here is that the name field is required and I cannot ui wise set it to take the name from the actual date field.

Making it then a custom content type instead would probably work, but seems overkill.

Adding an article of the timeperiod date field to the article content type would also seem to encapsulate all the necessary information, but how do I expose this to the editor?

I want the editor to see a list of the coming say 20 months and assign to each an article on the same page (a single save operation from the editor's point of view). I also want the editor to be able to override that for specific shorter time periods.

I'm using Drupal 7.

3

Using the Flag module seems like a no brainer to me to get this to work: introduce a global flag that is allowed to be used by your editors to flag relevant articles. Since Flags are fieldable, you could add extra field(s) to such flags to let the flagging user indicate an appropriate start date and end date.

With the above in place, you've reduced your question to creating an appropriate view (using Views) which shows the flagged article(s) for which their flag fields (start / end dates) have appropriate values as compared to the current date.

This solution is "without programming" (as in your question) ...

Ps: I'm assuming this is about D7.

  • That sounds good, I'm going to try that. And I should indeed have mentioned that it is about Drupal 7. I'm going to add that to the question. Thanks – Ernst Mar 29 '17 at 15:24
  • I don't want to accept and upvote an answer before testing the solution, but do want to acknowledge. I tested it and this works great. – Ernst Apr 4 '17 at 9:05

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.