you can probibly achive this with the string extensions in Umbraco.Core
yourstring.ToUrlSegment();
will take your string and make it safe to be used as part of an url.
there are loads of cool extension in that class - I like ReplaceMany and I've just looking now I've just found ToDelimitedList which maybecome my new favourite.
NiceUrl for custom pages
Hello
We are working on the web application with custom data pages.
It will be perfect for us to use the same method as Umbraco use in the library.NiceUrl(), but we do not have nodes.
So we have rows in database like
Interesting Header 1 Interesting Header 2 Interesting Header 3
Is there a public method that will take string and return nice url like Umbraco does - "interesting-header-1"
Thanks,
Alex
HI
you can probibly achive this with the string extensions in Umbraco.Core
will take your string and make it safe to be used as part of an url.
there are loads of cool extension in that class - I like
ReplaceMany
and I've just looking now I've just foundToDelimitedList
which maybecome my new favourite.hi Kevin
Thank you very much, this is exactly what I looked for. Have a nice weekend!
Thanks,
Alex
is working on a reply...