Copied to clipboard

Flag this post as spam?

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


  • JFPinto13 3 posts 23 karma points
    Jul 29, 2021 @ 15:04
    JFPinto13
    0

    URL override umbracoUrlAlias vs GetUrl

    We have a project made in umbraco 8 and when we put it into production we ran into a performance issue because of VirtualNode package. Faced with this performance failure we have to reformulate it without using VirtualNode. One of the options we have been analyzing is the use of the umbracoURLAlias ​​parameter, however in this case we have already faced several challenges. What are they: 1 - The url with all the folders is kept and the picker in the umbraco is made directly to the first url and not to the url of umbracoURLAlias. It's going to force us to work this out somehow. 2 - Since the url that we don't want "visible" exists and can be called somewhere, it forces us to have a canonicalUrl field with the value of umbracoURLAlias ​​so we don't have problems with SEO.

    Another hypothesis that looks promising is to override the GetUrl method. With that, I can say everywhere, including in umbraco, that the url of that page is X. However when I put that to work the page gives me 404 and when I go to see the url of that page in umbraco it says "This document is published but its URL cannot be routed" The code is exactly as it is in this example https://our.umbraco.com/Documentation/Reference/Routing/Request-Pipeline/outbound-pipeline#defaulturlprovider The only difference is in the customurl that in our case we change the path (Example:"/foo/b/a/name = /foo/name")

    Thank you for your help

  • Huw Reddick 1737 posts 6098 karma points MVP c-trib
    Jul 30, 2021 @ 08:00
    Huw Reddick
    0

    What kind of performance issues are you experiencing? We use the VirtualNode package and have not seen any performance problems.

  • JFPinto13 3 posts 23 karma points
    Jul 30, 2021 @ 21:32
    JFPinto13
    0

    Our problem is the fact that we have three folders in a row with virtual node. This is on most pages on our site. We did it because there are really many pages and we need a way to organize them to be easily accessible.

  • Huw Reddick 1737 posts 6098 karma points MVP c-trib
    Aug 03, 2021 @ 14:14
    Huw Reddick
    0

    You may need to write a custom content finder to map the new url back to what it is in Umbraco

    for our news items I wrote a DefaultUrlProvider to prepend the date of the item.

    To map the incoming 'new url' back to the news item in umbraco it required a custom IContentFinder

Please Sign in or register to post replies

Write your reply to:

Draft