You can configure the type metadata in the share-config-custom.xml file in <web-extension>. It is also possible to deploy custom configurations via JARs or AMPs.
The following snippet shows the forms definition in the share-config-custom.xml file.
<configevaluator="node-type"condition="cm:content"> <forms> <form> <field-visibility> <show id="cm:name" /> <show id="cm:title" force="true" /> <show id="cm:description" force="true" /> <show id="mimetype" /> <show id="cm:author" force="true" /> <show id="size" for-mode="view" /> <show id="cm:creator" for-mode="view" /> <show id="cm:created" for-mode="view" /> <show id="cm:modifier" for-mode="view" /> <show id="cm:modified" for-mode="view" /> </field-visibility> </form> </forms> </config>
The configuration defines that the cm:name property is visible in all modes, whereas the cm:creator, cm:created, cm:modifier, and cm:modified properties are visible in view mode only.
The mimetype and size properties are known as transient properties because they do not exist as properties in the model. These properties are formed from the cm:content property. The NodeFormProcessor knows about these properties and generates a field definition to represent them so that they will appear in the forms.
The force attribute ensures that the NodeFormProcessor searches the entire content model for the property or association definition before returning anything.