0

I have a requirement whereby the default image for an image field in the article node should be set for a 6 month period of time and then the default image changes for the next 6 months and so on. I tested this in the article content-type by setting the default image and then creating content off the content-type. I then changed the default image and created new content. This changed the images in the new and old contents. I would like the old content to retain the old default image and the new content to reflect the new default image. Any pointers on how to do this?

Thanks.

3

The quickest solution is to not use a default image, but instead use a (hidden) field in your content type that points to an image to display if the main image field is empty, and change it's content every 6 months.

ADDITION: The next quickest solution is to look in a directory for the newest image file there that isn't newer than the node in question, and use that image if the main image field is empty. This way, just putting a new image in that directory will automatically be picked up by new nodes, but won't impact nodes already created.

| improve this answer | |
  • Thanks Jimajamma, I'll give that a shot. I won't be able to accept your answer until I try the solution, which might take a while. – sotn Dec 28 '11 at 15:12

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.