Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I'm trying to create a custom routes for a package dynamically in a ApplicationEventHandler. I'm trying to use existing node url to form the route. However when I use the Umbraco Helper
var pageData umbracoHelper.ContentQuery.TypedContent(page.Id);
pageData.Url returns the absolute I'm trying to get the relative url to the domain.
I was thinking of an extension method which removes the host but wondered if there was a native method?
It looks like "useDomainPrefixes" is set to true in your solution.
You can change it in /config/umbracoSettings.config
"useDomainPrefixes" is set to false thanks for the suggestion. I ended up using an exension method with the following code:
Uri myUri = new Uri(pageData.Url());
pageUrl = myUri.AbsolutePath.TrimStart("/");
Thanks for sharing the solution, have a great day
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted