This issue has been posted before but it's been a few years so I'd like to raise it again. I have a site structured like this:
Home
Authors
Author Name
Categories
Category Name
Articles
Article 1
Article 2
I would like the URLs for the Article pages to be at the root www.mysite.com/article-1 instead of at www.mysite.com/articles/article-1. The reason for setting the article up in a folder is to make things look cleaner on the CMS side for the content folks but the articles themselves should live at the root of the site.
Is there a way to do this without having to set the umbracoUrlName on each article? Ideally a way to redirect the entire Articles/ folder.
it's not a solution in every situation (for example for multi site installs) but I think you could just move the articles node to the same level as home.
If articles has no template and is below home in the tree then it won't i think get rendered at the root (home will) but the URLs for articles below will be /article-1 /article-2 etc...
Kevin, thanks for your reply. I think moving that node to the root will complicate all of my queries on the other nodes. For example, there is a Category template that pull all of the articles that are associated with the category. I had a hard time in the past querying from inside one root node, out to the root, and into another node in the past.
It essentially lets you define document types that will be hidden from the umbraco-generated URLs (the url part that belongs to the node), so that nodes that are of the specified doctypes become "virtual" nodes.
It's very easy to configure (just install and add a line in your web.config as per instructions). If you do try it, any remarks are welcome. Source code is also available on Github.
The only drawback is that if you're using the same document type elsewhere, it'll also be hidden, so you'll have to use a document type that is exclusive to what you need to group there.
Hide subfolder from URL
Hi there-
This issue has been posted before but it's been a few years so I'd like to raise it again. I have a site structured like this:
Home
I would like the URLs for the Article pages to be at the root www.mysite.com/article-1 instead of at www.mysite.com/articles/article-1. The reason for setting the article up in a folder is to make things look cleaner on the CMS side for the content folks but the articles themselves should live at the root of the site.
Is there a way to do this without having to set the umbracoUrlName on each article? Ideally a way to redirect the entire Articles/ folder.
Thank you in advance.
Hi,
it's not a solution in every situation (for example for multi site installs) but I think you could just move the articles node to the same level as home.
If articles has no template and is below home in the tree then it won't i think get rendered at the root (home will) but the URLs for articles below will be /article-1 /article-2 etc...
Kevin, thanks for your reply. I think moving that node to the root will complicate all of my queries on the other nodes. For example, there is a Category template that pull all of the articles that are associated with the category. I had a hard time in the past querying from inside one root node, out to the root, and into another node in the past.
yeah, it's not always the way to do it.
although
would get you the root, and you could (if it's not null) call
to get the folder where your articles are.
Maybe this plugin will be of help - I published it some days ago, trying to solve this exact problem with "grouping" nodes:
https://our.umbraco.org/projects/website-utilities/virtualnodes/
It essentially lets you define document types that will be hidden from the umbraco-generated URLs (the url part that belongs to the node), so that nodes that are of the specified doctypes become "virtual" nodes.
It's very easy to configure (just install and add a line in your web.config as per instructions). If you do try it, any remarks are welcome. Source code is also available on Github.
The only drawback is that if you're using the same document type elsewhere, it'll also be hidden, so you'll have to use a document type that is exclusive to what you need to group there.
is working on a reply...