2009/11/13 François Cassistat <[email protected]>:
> Is there an easy way to disallow SNS other than defining a new node type and
> setting all new nodes in this type, so I can get ItemExistException on save
> to prevent SNS from happening?
The nt:folder doesn't allow SNS. If your application doesn't like
nt:folder, you may create a custom node type like following sample.
It's the same as nt:unstructured except the SNS validation.
<nodeType name="nt:nosamesiblings"
isMixin="false"
hasOrderableChildNodes="true">
<supertypes>
<supertype>nt:base</supertype>
</supertypes>
<childNodeDefinition name="*"
defaultPrimaryType="nt:xunstructured"
sameNameSiblings="false"
autoCreated="false" mandatory="true"
onParentVersion="IGNORE" protected="false"/>
<propertyDefinition name="*"
requiredType="undefined"
autoCreated="false"
mandatory="false"
onParentVersion="COPY"
protected="false"
multiple="false"/>
<propertyDefinition name="*"
requiredType="undefined"
autoCreated="false"
mandatory="false"
onParentVersion="COPY"
protected="false"
multiple="true"/>
</nodeType>
As this node type could be interesting for some people, it might be
good to provide by default.
-Guo