Copied to clipboard

Flag this post as spam?

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


  • jake williamson 177 posts 789 karma points
    Feb 23, 2017 @ 11:14
    jake williamson
    0

    is there a friendly url method in umbraco core?

    chaps,

    i've been searching for a friendly url method in umbraco, the one that would hook into the rules set in the 'urlReplacing' section of the 'umbracoSettings.config'?

    the reason i'm searching is that i want to create some safe urls based on another field on the doctype for the url alias but i want them to adhear to the same rules that umbraco sets for generating urls!

    can anyone point me in the right direction?

    cheers,

    jake

  • Jeroen Breuer 4861 posts 12138 karma points MVP 3x admin c-trib
    Feb 23, 2017 @ 11:37
    Jeroen Breuer
    0

    Hello,

    There is an extension method called ToUrlSegment in the Umbraco.Core namespace. Is that what you're looking for?

    So you could do url.ToUrlSerment();

    Jeroen

  • jake williamson 177 posts 789 karma points
    Feb 23, 2017 @ 11:43
    jake williamson
    0

    1st class sir, that's exactly what i was looking for ;)

    cheers jeroen, i owe you one!

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies