Would be fine with a plugin that did this, but you could also configure the container_suffix to match the HTML content type suffix if you wanted. Will put some thought into it, but can you enter a ticket for this issue so we can discuss/track the details?
I realized recently that a page’s "friendly URL" changes when its Container status changes. If I have a parent document aliased ’aaa’ with a child of ’bbb’, the friendly URL for the child document is ’aaa/bbb.html’. But if I have this page on my site for a while, then decide to add new pages beneath ’bbb’, thus making it a container, the friendly URL for ’bbb’ changes from ’aaa/bbb.html’ to ’/aaa/bbb/’.
I can certainly see this posing a problem for some sites - a long-published page suddenly becomes a container, and the URL changes.
I think a simple failsafe approach would be this: When a published page changes its container status (by either becoming a container or no longer being a container), Manager notices this and prompts the user, notifying that this will change the friendly URL, and asking if they want to create a permanent alias/symlink/whatever you call it.
Does this make sense? It feels to me like something that should be a core option.
My suggestion would be not to make any symlinks for the parent resource on creating a new document!
I think a simple failsafe approach would be this: When a published page changes its container status (by either becoming a container or no longer being a container), Manager notices this and prompts the user, notifying that this will change the friendly URL, and asking if they want to create a permanent alias/symlink/whatever you call it.
Keep in mind that in, Revo, having children and Container status are independent. Container status is determined by the checkbox on the page settings tab (isfolder field). Having children is determined by the hasChildren() method of the resource, which checks for children.
Unfortunately, legacy snippets may not know about this and assume they are the same thing (which they are in Evo). Some check for actual children, some check the isfolder field.
It’s simply to provide more flexibility in how you handle requests to folders; for instance, in a traditional web server, accessing foo/ would actually try to load foo/index.html or foo/index.php or similar. By identifying these containers we can then treat them differently as needed, configure different URL extensions exclusively for containers, or, by making a Resource with children not be a container, have it treated like a file with it’s normal extension.
What is the significance of container status then? I can understand the concept of checking the box and making a resource a container before it has any children... but I can’t grasp a document that has children *not* being considered a container. Please help me understand.
Quote from: vhollo at Mar 24, 2010, 08:31 AM
Would be fine with a plugin that did this...
... and of course on deleting the last child document from it.
A plugin would be nice to ask me if I confirm to change the ’Container’ status of the parent BUT only when I create the first child document of it.
Personally, I don’t want it asking me anything or auto-adjusting the isfolder attribute unless I tell it to specifically. I absolutely separate the concepts of having children and being a container/folder Resource. i.e. when you add or remove files from file system folders, you don’t automatically change the folder to a file. Plus, I like being able to have a Resource with children treated as if it’s not a folder.
Quote from: OpenGeek at Mar 23, 2010, 11:57 AMQuote from: vhollo at Mar 24, 2010, 08:31 AM
Would be fine with a plugin that did this...
... and of course on deleting the last child document from it.
A plugin would be nice to ask me if I confirm to change the ’Container’ status of the parent BUT only when I create the first child document of it.
(I think it’s important to at least notice the user on changing the properties of a resource other than that is actually being saved/deleted.)
Jason, would you comment on this please?