2

I have a job board running on Craft. We're "auto expiring" the posts from listing pages based on the post date.

However, I want to redirect the actual entry page to either a 'this job has expired' page in cases where some one is linking from an external site.

Is that possible?

3

Hadn't thought about using simple if logic here in the template

{% if entry.postDate <= now|date_modify('-90 days') %}
    {% redirect 'jobs/expired' %}
{% endif %}
2

For SEO purposes, it might actually be better to keep the listing live, but clearly mark it as expired.

What I ended up doing was just having an additional field in my section that defined my own internal status of the entry, and then adjusted the display based on that.

If simple expiration is enough for you, then it probably doesn't matter, though.

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.