Is it possible to Change the fieldset / tab names for a content type XML file? If not, what are the options ( I assume changing it in a po-file will change all other content types)
So, in the screenshot, I want to change 'Default' to 'Something' and 'Categorization' to 'Another'.
So, from a quick look at our code, it seems that the gist of it is:
from plone.dexterity.browser.add import DefaultAddForm
from plone.dexterity.browser.edit import DefaultEditForm
class ArticleAddForm(DefaultAddForm):
default_fieldset_label = _('Article')
class ArticleEditForm(DefaultEditForm):
default_fieldset_label = _('Article')
i.e. create a custom add/edit form for your content type and set the default_fieldset_label to your preferred name
class CollectionAddForm(DefaultAddForm):
portal_type = "Collection"
default_fieldset_label = _('My Fieldset Label')
class CollectionEditForm(DefaultEditForm):
portal_type = "Collection"
default_fieldset_label = _('My Fieldset Label')
class CollectionAddFormView(DefaultAddView):
form = CollectionAddForm
class CollectionEditFormView(DefaultEditView):
form = CollectionEditForm
Additionally you could override the other group labels like this:
class ArticleAddForm(DefaultAddForm):
def update(self):
super().update()
for group in self.groups:
if group.id == "categorization":
group.label = _("My custom label")
I got an error on 'id', but this (using label) works:
class CollectionAddForm(DefaultAddForm):
def update(self):
super().update()
for group in self.groups:
if group.label == "Categorization":
group.label = "My
For the Add Form you need the Adapter, for the Edit Form you need the Browser Page.
The DefaultEditForm inherit from DexterityExtensibleForm and in this class the portal_type is needed.
class ActionItemsEditForm(DefaultEditForm):
portal_type = "action_items"
default_fieldset_label = 'Home'
class ActionItemsEditFormView(DefaultEditView):
form = ActionItemsEditForm