I'm not even sure if this is possible, but I've got a lot of nodes at the root of the site and I'd like to group them into folders, like you can in the media section.
I don't want the folder to affect the URL of it's descendants though. In effect, it's a kind of 'virtual node', whose only purpose is to make the editor experience a little neater.
For example:
-- Home
---Folder
----Page
The URL for page would still be /page/
Is this possible at all?
I've tried creating a custom UrlSegmentProvider, returning string.Empty, but unfortunately descendant nodes are showing as published but not in the content cache.
but essentially I think you'll need a register custom IContentFinder to 'find' the content at the url with the 'folder' missing. I think the message you see in the backoffice - is Umbraco trying to confirm it can find the content at the generated url, which is why you see the message.
Often it can be easier to create a UrlProvider that inherits DefaultUrlProvider, and remove the folder from there.. but sounds like you have the segment bit working ok!
Folder in Content Tree
Hi guys,
I'm not even sure if this is possible, but I've got a lot of nodes at the root of the site and I'd like to group them into folders, like you can in the media section.
I don't want the folder to affect the URL of it's descendants though. In effect, it's a kind of 'virtual node', whose only purpose is to make the editor experience a little neater.
For example:
-- Home
---Folder
----Page
The URL for page would still be /page/
Is this possible at all?
I've tried creating a custom UrlSegmentProvider, returning string.Empty, but unfortunately descendant nodes are showing as published but not in the content cache.
As always, thanks in advance for any assistance!
Kind regards
Phil
Hi Philip
There is a V7 package that does this:
https://our.umbraco.com/packages/website-utilities/virtualnodes/
The code won't work with V8, but the theory is the same: (eg names of methods, and variables have changed between v7 and v8)
The code is here https://github.com/sotirisf/Umbraco-VirtualNodes
but essentially I think you'll need a register custom IContentFinder to 'find' the content at the url with the 'folder' missing. I think the message you see in the backoffice - is Umbraco trying to confirm it can find the content at the generated url, which is why you see the message.
Docs have been updated for V8 here: https://our.umbraco.com/Documentation/Reference/Routing/Request-Pipeline/outbound-pipeline
Often it can be easier to create a UrlProvider that inherits DefaultUrlProvider, and remove the folder from there.. but sounds like you have the segment bit working ok!
regards
Marc
Brill, thanks for the quick response Marc. :)
is working on a reply...