I am using Drupal 6.

I would like to create for a limited time (start date, end date) another version of a node that would share almost all its properties. This featured version is in fact a recipe sponsored by a company, so we have to put the company logo, etc.

About the only thing that would change is a couple of line of data, another category (keeping the other ones) and the main image.

An exemple of the node I want to create a featured version is here : http://www.moietcie.ca/cuisine/recettes/entrees-et-amuse-gueules/acras-de-morue

The big difficulty is to have the possibility to create a temporary version. After the date is passed, it must return to normal. Hence, I must keep all the data of the normal version.

I first thought of hijacking the translation system since we don’t use translations and force a fake language: French — Featured. Content without this translation would fallback to French (the normal version).

I did some quick tests, and beside the fact that my admin menu is now in English, it works but I hate my idea. I have to modify core modules of Drupal and I know this is bound to fail at some point.

Do you have any ideas ?

Thanks a lot

  • Use Scheduler module not Panels for it. – ram4nd Sep 29 '11 at 6:58
  • With Scheduler, you can set the date a node becomes published and/or unpublished automatically. In your described case, you would create several nodes: one for each variation of the text, then set all their publish/unpublish dates so that they change. Downsides: the different nodes will have different urls; bookmarks and permalinks will provide a "challenge" :) – berkes Oct 4 '11 at 9:15

I would do the following, but it assume that you use Panels.

  1. Create a panel page.

  2. Add your first node as Content. Add a Visibility rule, choose PHP, and add in code that checks your date range based on the current time.

  3. Add your second node as Content. Add a Visibility rule, choose PHP, and add in inverse of the code above.

I wouldn't be surprised if you can also accomplish this with the Scheduler module, but I am not sure how the URL would be handled in this scenario.

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.