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 207 posts 872 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 4908 posts 12265 karma points MVP 4x 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 207 posts 872 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!

Please Sign in or register to post replies

Write your reply to:

Draft