Skip to content

Commit

Permalink
Disable Richtext and toc behavior on Document.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
sneridagh committed Dec 3, 2019
1 parent 2fb11ac commit 4e011e8
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 1 deletion.
5 changes: 5 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ Volto Editor
It enables the Volto Blocks behavior on the ``Document`` content type by
default, enabling Volto editor for that content type.

Document content type
---------------------

``Richtext`` and ``table of contents`` behaviors has been removed from the ``Document`` behaviors since it's confusing for the users if it shows in the form.

Disabled content types
----------------------

Expand Down
1 change: 1 addition & 0 deletions src/kitconcept/voltodemo/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
i18n_domain="kitconcept.voltodemo">

<includeDependencies package="." />
<include file="upgrades.zcml" />

<genericsetup:registerProfile
name="default"
Expand Down
2 changes: 1 addition & 1 deletion src/kitconcept/voltodemo/profiles/default/metadata.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<version>1009</version>
<version>1010</version>
<dependencies>
<dependency>profile-collective.folderishtypes.dx:default</dependency>
<dependency>profile-plone.restapi:blocks</dependency>
Expand Down
1 change: 1 addition & 0 deletions src/kitconcept/voltodemo/profiles/default/types.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
<object name="Plone Site"
meta_type="Factory-based Type Information with dynamic views"/>
<object meta_type="Dexterity FTI" name="Event" />
<object meta_type="Dexterity FTI" name="Document" />
</object>
20 changes: 20 additions & 0 deletions src/kitconcept/voltodemo/profiles/default/types/Document.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0"?>
<object
i18n:domain="plone"
meta_type="Dexterity FTI"
name="Document"
xmlns:i18n="http://xml.zope.org/namespaces/i18n">

<!-- Enabled behaviors -->
<property name="behaviors">
<element value="plone.namefromtitle" />
<element value="plone.allowdiscussion" />
<element value="plone.excludefromnavigation" />
<element value="plone.shortname" />
<element value="plone.dublincore" />
<element value="plone.relateditems" />
<element value="plone.versioning" />
<element value="plone.locking" />
</property>

</object>
15 changes: 15 additions & 0 deletions src/kitconcept/voltodemo/upgrades.zcml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
xmlns:i18n="http://namespaces.zope.org/i18n"
i18n_domain="kitconcept.voltodemo">

<genericsetup:upgradeDepends
source="1009"
destination="1010"
profile="kitconcept.voltodemo:default"
title="Apply types.xml to update typesinfo"
import_steps="typeinfo"
/>

</configure>

0 comments on commit 4e011e8

Please sign in to comment.