Copied to clipboard

Flag this post as spam?

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


  • Damian Green 452 posts 1433 karma points
    Jan 14, 2014 @ 12:02
    Damian Green
    0

    NiceUrl returns only root url when using an alias

    I have some urls/pages on my site that are accessed using the template Alias.  If NiceUrl (im using with domain) is called the alias is ignored and only the root url is used.

    I think this is probably correct as nice url needs a nodeid which is the document id from the content node.

    Is it therefore bad practice to put physucal content on an alias?

    And is there an umbraco way to get the Nice url with the alias?

     

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Jan 14, 2014 @ 12:09
    Jeroen Breuer
    100

    Hello,

    There are some situations where it's nice to use alt templating (for example ajax paging), but generally it's better to just use nodes. An alt template can't get specific properties because it doesn't really belong to a node. If you want an alt template url just get the node on which you want to use it with NiceUrl and than add the alt template name to the url.

    Jeroen

  • Damian Green 452 posts 1433 karma points
    Jan 14, 2014 @ 13:07
    Damian Green
    0

    Hi Jeroen,

    I have done something similar to the post Matt did but have noticed we have ended up with some canonical issues with google indexing from the links and extra query strings for paging/sort so i have been addding the canonical meta tag https://support.google.com/webmasters/answer/139394?hl=en to pages and its here i have come across the issue when i thought it would be a good idea to have the tag on most pages.

    The case i came across however was a data capture form that was on an alias rather than content but in hendsight doesnt really need the canonical tag on it so ive just removed it.

    I was just perusing the use of aliases.

    Thanks for your ideas.

    Cheers,

    Damian

Please Sign in or register to post replies

Write your reply to:

Draft