Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jon 92 posts 166 karma points
    14 days ago
    Jon
    0

    Create a Redirect when a page is unpublished

    We have a section where events are shown in a list. An email is sent out to users.

    BUT if an event has ended the page is Un-Published. So when the user clicks on their email link it takes them to a 404 page.

    Is there a way where the user could be taken to a different type of page - such as a friendly page explaining that the event has ended and not a 404 page?

  • Paul Seal 510 posts 2791 karma points MVP 4x c-trib
    1 week ago
    Paul Seal
    0

    Hi Jon

    This sounds like an ideal candidate for using the Skybrud Redirects package. Just before you unpublish the page you add an entry to Skybrud redirects and point it to the event ended page. You could even go further and hook into the unpublish event and write it into the Skybrud Redirects table automatically.

    https://our.umbraco.com/packages/website-utilities/skybrud-redirects/

    Kind regards

    Paul

  • Jon 92 posts 166 karma points
    1 week ago
    Jon
    0

    Thank you so much. Is it possible to add a redirect into the redirects table via the Skybrud code? I have had a look but couldn't find anything but probably looking in the wrong place.

    Do you have any example code?

    Thanks again

Please Sign in or register to post replies

Write your reply to:

Draft