Skip to content

Commit

Permalink
Purge model_source property from Person.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
mbarde committed May 15, 2024
1 parent 4430e1c commit 35cfbc9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions backend/src/plone/edu/profiles/default/types/Person.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,9 @@
<element value="plone.edu.behaviors.eduperson.IEduPersonData" />
<element value="volto.blocks.editable.layout" remove="true" />
</property>

<property name="model_source">&lt;model xmlns:i18n=&quot;http://xml.zope.org/namespaces/i18n&quot; xmlns:marshal=&quot;http://namespaces.plone.org/supermodel/marshal&quot; xmlns:form=&quot;http://namespaces.plone.org/supermodel/form&quot; xmlns:security=&quot;http://namespaces.plone.org/supermodel/security&quot; xmlns:indexer=&quot;http://namespaces.plone.org/supermodel/indexer&quot; xmlns:lingua=&quot;http://namespaces.plone.org/supermodel/lingua&quot; xmlns:users=&quot;http://namespaces.plone.org/supermodel/users&quot; xmlns=&quot;http://namespaces.plone.org/supermodel/schema&quot;&gt;
&lt;schema&gt;
&lt;/schema&gt;
&lt;/model&gt;</property>
</object>
5 changes: 5 additions & 0 deletions frontend/src/components/Views/Person.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const PersonView = ({ content }) => {
return <h1 className="documentFirstHeading">{content.title}</h1>;
};

export default PersonView;
3 changes: 3 additions & 0 deletions frontend/src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,14 @@
// [Internal] All the imports of modules required for the configuration *must* happen
// here BEFORE the following line
import AffiliationWidget from '@package/components/Widgets/Affiliation/AffiliationWidget';
import PersonView from '@package/components/Views/Person';

import '@plone/volto/config';

export default function applyConfig(config) {
config.widgets.widget.affiliation_widget = AffiliationWidget;

config.views.contentTypesViews.Person = PersonView;

return config;
}

0 comments on commit 35cfbc9

Please sign in to comment.