At my little talk about the hierarchy in the datamodule at the
conference last week, an interesting question was asked. We set up
the types in hierarchy, and the Tree Gui forces/guides the user to
follow this hierarchy. (If type b is a child of type a, the user can
only create nodes of type b as a child of nodes of type a.) But in
the context menu the ‘move’ option exists, which gives the user the
possibility to mix up this hierarchy.
I see.
What to to with this problem? Adapting the behaviour of the move and
copy command is not the way to go surely. What about this possibility:
Not sure if this is so wrong. At least it would work without breaking
the copy/move feature in general. To set a message you can user the
AlertUtil.
Add a property to the DataModule with name “allowNodeCopyMove”,
default this is set to false. This removes the move and copy command
from the Data tree context menu and function bar. Order cannot be
changed in the tree, but in case of emergency you can do that in the
JCR browser of the datamodule. You can give webeditors the
permission on the tree, but not on the JCR browser for example. If
you trust the webeditor or your code does not rely on a strictly
maintained hierarchy structure, the allowNodeCopyMove can be set to
true.
Being able to move and order items is in my opinion essential
(ordering even for subelements).
We could, similar to what we have done in related scenarios, simply
reduce the feature to elements laying in a folder.
Please share your views on this issue.
There is also the “sort by name” issue. I think it should be allowed
to be set only on the type which is the root in a tree of types. The
actual sorting is done for the whole tree, not per type within that
tree. Another problem then comes up: you can have two root types
sharing the same rootpath. If type I has the sort set to true, and
type II does not, what to do then with that sorting? I am not at all
convinced of the use of sorting by name anyway. These views will
probably only be seen by webeditors or developers, using the nodes
in the website has nothing to do with the sorting in the tree in
AdminCentral.
Again, please share your views on this issue please.
Feel free to restrict the sorting. True if multiple types share the
same root path, it is not clear what to do. We could simply make the
first found type the stronger. At least there would be a kind of a rule.
Philipp Bärfuss
Magnolia International Ltd.
---------------------------------------
Meet us at the Magnolia Conference
http://www.magnolia-cms.com/conference
---------------------------------------
Magnolia® - Simple Open Source Content Management
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------