Copied to clipboard

Flag this post as spam?

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


  • Lewis 27 posts 90 karma points
    Apr 30, 2015 @ 14:05
    Lewis
    0

    Umbraco Url Generation and Publishing

    Hey

    When a node is renamed then save and published, Umbraco updates the URL, the ContentService.Published event is raised and the node in question is passed to the event handler.

    If the node has descendants, Umbraco needs to update their URL's aswell, but the descendant nodes do not appear in parameters passed to the handler. 

    I need to perform an action (generating a value for umbracoUrlAlias) for each of the descendant, so was hoping I could step in at the same point Umbraco is updating the URL properties.

    What is the best way to do this / is it possible?

    I was thinking of using content.Descendants() on IContent to update each of the values for umbracoUrlAlias and using SaveAndPublish with raiseEvents = false or just Save (depending if the node is published or not).

    Any thoughts much appreciated.

    Cheers,
    Lewis

     

Please Sign in or register to post replies

Write your reply to:

Draft