Copied to clipboard

Flag this post as spam?

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


  • David Brendel 792 posts 2970 karma points MVP 3x c-trib
    Aug 03, 2017 @ 06:48
    David Brendel
    0

    Refresh routes registered when new content is created

    Hi all,

    I'm currently trying to use the UmbracoVirtualNodeRouteHandler for mapping custom routes to content nodes.

    No I need to create a new route for each content node of a specific type. on startup of the application everything works fine. Routes are getting registered and are usable.

    Problem is now that I also want to register the routes when a new content node is created. I implemented the logic for this thanks to code from Articulate package and the custom routes are cleared and registered.

    But when I try to open the route in the browser I get a 404 error. After restarting the website everything is working.

    Is it possible at all to register routes while the website is running?

    Regards David

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    Aug 03, 2017 @ 07:07
    Dave Woestenborghs
    0

    Hi David,

    I notice this as well from time to time. I'm using the code from Articulate as well.

    Sometimes after another publish (does not have to be the same item) it starts working. Seems to me routes are cached some way.

    Maybe worth creating a issue on the tracker. I never got arround to doing that.

    Dave

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    Aug 03, 2017 @ 07:12
  • David Brendel 792 posts 2970 karma points MVP 3x c-trib
    Aug 03, 2017 @ 07:43
    David Brendel
    0

    Hi Dave,

    thanks for answering. Will see if I open an issue on the tracker. How have you handled the issue in the end?

    Was thinking about moving to ContentFinder but don't think that you can use RouteHijacking with them to use an additional parameter in the template methods in the controller.

    Regard David

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    Aug 03, 2017 @ 08:35
    Dave Woestenborghs
    0

    In the end we moved to contentfinders. That does the job for us as well.

    Dave

Please Sign in or register to post replies

Write your reply to:

Draft