I'm aware that on a document-type by document-type basis, using the "Structure" tab you can limit the types of content that can be created beneath nodes.
However, is there a way to limit which document types can be created at the "top-level" i.e. directly under the "Content" node in the content tree ? It appears as if by default all document types can be created at this level. What if I wanted to restrict the document types that are available at the top level to only a sub-set of the available document types in my Umbraco instance ?
I've never come across a way to do this without having to dig into the core.
The best way to do it is to create a fake 'content' node which is just a container that has your structure defined that you require and then re-assign the permissions of all users so that their start node is your fake 'content' node.
That doesn't require and code changes or anything, it's built into Umbraco and can be done in the UI.
I have done this, but it requires you to write your own version of the content tree control and add in your own code to make it happen. It's not that difficult to do if you don't mind getting your hands dirty, but it does make upgrading Umbraco at a later date problematic.
Limiting top-level document types
Hi,
I'm aware that on a document-type by document-type basis, using the "Structure" tab you can limit the types of content that can be created beneath nodes.
However, is there a way to limit which document types can be created at the "top-level" i.e. directly under the "Content" node in the content tree ? It appears as if by default all document types can be created at this level. What if I wanted to restrict the document types that are available at the top level to only a sub-set of the available document types in my Umbraco instance ?
Thanks in advance,
Chris
sorry I didn't read properly again, um...yeah what Slace said :)
I've never come across a way to do this without having to dig into the core.
The best way to do it is to create a fake 'content' node which is just a container that has your structure defined that you require and then re-assign the permissions of all users so that their start node is your fake 'content' node.
That doesn't require and code changes or anything, it's built into Umbraco and can be done in the UI.
What @slace said!
I have done this, but it requires you to write your own version of the content tree control and add in your own code to make it happen. It's not that difficult to do if you don't mind getting your hands dirty, but it does make upgrading Umbraco at a later date problematic.
@Slace How would you stop that fake directory becoming part of the URL?
@Rich Green
You can use the "hostnames" feature when rightclicking on the "fake" root node, and set the hostname there.
Then that node will function as the root of that hostname.
The first level isn't included in the URL so you're fine. I always have my content structure like this:
Thanks Slace & enqgard, however this doesn't get around my problem (hope this isn't off topic to the original poster).
I'm looking to run multiple sites off the same install (all with the same functionality but different look and feel), something like this:
-Content
- Website1.com
- Home
- Contact Us
- About Us
- Settings
- Website2.com
- Home
- Contact Us
- Other content
- About Us
- Settings
So my required URL's would be
website1.com/contact-us
website2.com/about-us
However if as enqgard suggestion I set my host name at 'Home' then I get 404 errors, if I set the hostname at 'website1.com' I get the following URL
website1.com/home/contact-us
Is what I'm trying to do possible without too much grief? I've always thought hostnames would need to be set on the first level.
Many thanks
Rich
is working on a reply...