Hi, I'm having a problem when using umbracoUrlAlias and adding a hostname for a different language. The page doesn't work when using CurrentPage property.
For example:
I've an about page that it's URL is localhost.com/en/page/about (with hostname)
I added the umbracoUrlAlias to be just about, but I wanted it to be like localhost/en/about
after doing that my about page loses it's reference and it starts referencing my home page, which all pages inherits.
Is it possible to use culture and hostnames with umbracoUrlAlias? I'm having to do this workaround because I added some blank pages without templates just for a better usability on the back office, and that created the page section on the URL that I mentioned earlier which I don't want in the URL.
Not a direct answer to your question related to umbracoUrlAlias, but this package might be a better option to hide specific url segments like you're wanting to do.
I added the <add key="virtualnode" value="docTypeToMakeVirtual"/>
to my Web.config file in the root folder of my project, but there is also a web.config file inside the umbraco folder and the views folder.
Which folder is the right one?
Anyway, I added to the web.config file on the project root folder, but now I'm getting Index was outside the bounds of array. It did seem to work at first glance, because I looked at the URLs that were previously having the page before them, and it was removed.
Hi Victor, its the one in the root you want. You'll just want to change "docTypeToMakeVirtual" to the actual document type of the "page" you're wanting to hide.
Regarding the error, wondering if you added the key for virtualNode twice?
This is a picture of my document types and how they are created on the content:
Images
EDIT: I just checked my property tab on a published content, and it said this:
"This document is published but its url would collide with content (error)"
Yes, if I remove the add key everything works back as normal.
EDIT: if I manually add the virtual node that was suppose to be hidden, it works as well. But when I remove to see if the package is working, the error happens.
When I add the key, on my index, I can see where the links are going, and they do not have the previous content URL, but when I click on them, I get the error. Removing the key fixes this.
I've been recently using culture and hostnames to get a closer result. But I've two nodes that has to have the same URL:
Home
Page1
News
Page1
News article
I thought about putting on as a children of Home/Page1 but I'm letting the user create pages, by making the children of the page being html layouts. Because of that I think it wouldn't be a good display to have the news inside the Page1. Is there another way or structure to do this?
Using umbracoUrlAlias and culture hostnames
Hi, I'm having a problem when using umbracoUrlAlias and adding a hostname for a different language. The page doesn't work when using CurrentPage property.
For example: I've an about page that it's URL is localhost.com/en/page/about (with hostname)
I added the umbracoUrlAlias to be just about, but I wanted it to be like localhost/en/about
after doing that my about page loses it's reference and it starts referencing my home page, which all pages inherits.
Is it possible to use culture and hostnames with umbracoUrlAlias? I'm having to do this workaround because I added some blank pages without templates just for a better usability on the back office, and that created the page section on the URL that I mentioned earlier which I don't want in the URL.
This is my tree structure:
Thanks for the help.
Hi Victor,
Not a direct answer to your question related to umbracoUrlAlias, but this package might be a better option to hide specific url segments like you're wanting to do.
https://our.umbraco.org/projects/website-utilities/virtualnodes/
Hope this helps,
Amir
I added the
<add key="virtualnode" value="docTypeToMakeVirtual"/>
to my Web.config file in the root folder of my project, but there is also a web.config file inside the umbraco folder and the views folder.
Which folder is the right one?
Anyway, I added to the web.config file on the project root folder, but now I'm getting Index was outside the bounds of array. It did seem to work at first glance, because I looked at the URLs that were previously having the page before them, and it was removed.
Hi Victor, its the one in the root you want. You'll just want to change "docTypeToMakeVirtual" to the actual document type of the "page" you're wanting to hide.
Regarding the error, wondering if you added the key for virtualNode twice?
-Amir
Yep, I added only one key with multiple document types seperated by commas, like this:
This is a picture of my document types and how they are created on the content: Images
EDIT: I just checked my property tab on a published content, and it said this: "This document is published but its url would collide with content (error)"
Hmm, sure the error is not related to code on the site outside of that package?
Yes, if I remove the add key everything works back as normal.
EDIT: if I manually add the virtual node that was suppose to be hidden, it works as well. But when I remove to see if the package is working, the error happens.
When I add the key, on my index, I can see where the links are going, and they do not have the previous content URL, but when I click on them, I get the error. Removing the key fixes this.
Is there other way to solve this? Thanks for helping Amir.
I've been recently using culture and hostnames to get a closer result. But I've two nodes that has to have the same URL:
I thought about putting on as a children of Home/Page1 but I'm letting the user create pages, by making the children of the page being html layouts. Because of that I think it wouldn't be a good display to have the news inside the Page1. Is there another way or structure to do this?
is working on a reply...