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?
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.
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.
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?
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
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
is working on a reply...