Reputation: 21126
I have a DocumentType
called Blogs
. It has a child DocumentType
called Blog
.
I create a content of type Blog
.
The name of that content is "Coding is great".
I can now navigate to that blog with the URL:
www.example.com/coding-is-great
I want it to be:
www.example.com/blogs/coding-is-great
How can I prefix URLs with something like the above?
-----Edited
In response to wingyip answer. I do already have a structure like this:
But the urls do not generate as you'd expect.
Upvotes: 1
Views: 251
Reputation: 3536
I disagree with the approach taken by the other two - To achieve what the op requires is simpler by rearranging content.
Its very important to note, and is a common issue with people starting out in Umbraco, that the hierarchy of your document types has nothing to do with the structure/hierarchy of your website.
The structure of your website is dictated by your Content tree.
So if you had a parent node called Blogs
which had a child node of Coding is great
then you wouldn't have to do any mucking around - the url would be as you require it.
Home
Blogs
Coding is great
In your document types, is there any reason that Blog
is a child of Blogs
. The only valid reason to do this is if Blog
needs to inherit properties from Blogs
otherwise Blog
should not be nested.
If I was doing this I may have a document type called Blog with an associated template that would list my Blog items.
Does that clear anything up?
Upvotes: 4
Reputation: 1
Create in TextPage (Settings=>Document Types=>Master) new property umbracoUrlAlias and enter new alias for content How create url alias
Upvotes: 0