SlideShare a Scribd company logo
Alin Voinea
Eau de Web, Romania
Plone 6 / Volto
Dexterity Content Types
Schema & Layout
> foreward
Python 3
Type "help" for more information.
> forward
Welcome to Node.js
Type ".help" for more information.
>>> import this
>>> this.__dict__
{
“name”: “Alin Voinea”,
“github”: “avoinea”,
“twitter”: “alinvoinea”,
“slack”: “avoinea”,
“mail”: “avoinea[]plone[]org”,
“version”: 2020,
“keywords”: [
“Volto”, “Plone”, “Python”,
“Docker”, “Rancher”, “React”,
“jQuery”, “DevOps”,
...more
]
Content Types in Plone 6 / Volto
● Archetypes● Archetypes
● Dexterity Content Types
● Metadata ~ Schema
~ Layout● Blocks
● Behaviors
Schema
Schema Schema
Schema Schema
Schema
Schema
Schema
Schema Schema
Schema
Schema
Dexterity Content Types - Metadata
Plone Schema
● How do we define Content-Types Schema:
○ TTW Schema Editor
○ GenericSetup profile
○ Behaviors
TTW Schema Editor - Demo
https://youtu.be/MACV_85_HgA
Generic Profile XML
<model>
<schema>
<field name="title" type="zope.schema.TextLine">
<title>Title</title>
</field>
<field name="description" type="zope.schema.Text">
<title>Description</title>
</field>
<field name="date" type="zope.schema.Datetime">
<title>Publishing Date</title>
</field>
</schema>
</model>
Behavior / Schema
class ISchema(model.Schema):
model.fieldset('default', label=_('Default'),
fields=['title', 'description', 'date'],
)
title = schema.TextLine(
title=_('Title'),
required=True
)
description = schema.Text(
title=_('Summary'),
)
date = schema.Datetime(
title=_('Publishing Date'),
)
Python {
"fieldsets": [
{
"id": "default",
"title": "Default"
"fields": [ "title", "description", "date"],
}
],
"properties": {
"title": { "title": "Title", "type": "string"},
"description": { "title": "Summary", "type": "string", "widget": "textarea"},
"date": { "title": "date", "type": "string", "widget": "datetime" },
}
},
"required": [ "title" ],
}
RestAPI (JSON)
Plone 6 / Volto
Schemas
Schema based frontend components
import schema from './schema';
import InlineForm from '@plone/volto/components';
<InlineForm
schema={schema}
title={schema.title}
formData={data}
/>
InlineForm
import schema from './schema';
import Modal from
'@plone/volto/components';
<ModalForm
schema={schema}
title={schema.title}
formData={this.props.data}
/>
ModalForm
import schema from './schema';
import Form from '@plone/volto/components';
<Form
schema={schema}
title={schema.title}
formData={data}
/>
Form
import schema from './schema';
import ObjectWidget from '@eeacms/volto-object-widget';
<ObjectWidget
schema={schema}
id={id}
errors={errors}
/> ObjectWidget
import schema from './schema';
import SchemaWidget from '@plone/volto/components';
<SchemaWidget
schema={schema}
id={id}
errors={errors}
/> SchemaWidget
Layout
Layout Layout
Layout Layout
Layout
Layout
Layout
Layout Layout
Layout
Layout
Dexterity Content Types - Blocks
Blocks
Through the freedom that they provide,
Volto blocks are a
foundation for innovation
that enables Plone to step in line with
the latest state of the art
for web development
Tiberiu Ichim
...with freedom comes great responsibility
Ronald Reagan
Page Layout
Blocks
Power to the ppl...
Block’s properties
Change position
Remove
Add new blocks
Placeholder
ReadOnly / Editable
Block settings schema
const Schema = {
title: 'Block settings',
fieldsets: [
{ id: 'default', title: 'Default',
fields: [
'placeholder', 'required', 'fixed', 'disableNewBlocks', 'readOnly'
],
},
],
properties: {
'placeholder': {...},
'required': {...},
...
}
};
TTW Layout Editor - Demo
https://youtu.be/yTToDfzXIvI
Layout - Custom behavior
behaviors.py
@provider(IFormFieldProvider)
class IDoTheZuLayout(model.Schema):
model.fieldset(
"layout",
label=_(u"Layout"),
fields=[
"blocks",
"blocks_layout"
])
blocks = JSONField(
title=u"Blocks",
default=custom_blocks
)
blocks_layout = JSONField(
title=u"Blocks Layout",
default=custom_blocks_layout
)
custom_blocks = {
"title": {
"@type": "title",
"placeholder": "Title here",
"required": True,
"fixed": True,
},
"description": {
"@type": "description",
"placeholder": "Description here",
},
"cover": {
"@type": "image",
"placeholder": "Cover image",
"required": True,
"fixed": True,
},
}
custom_blocks_layout = {
"items": [
"title",
"description",
"cover",
]
}
configure.zcml
<plone:behavior
name="do.the.zu.layout"
title="A Do The ZU Blocks Layout"
description="Enables Volto Blocks support"
provides=".behaviors.IDoTheZuLayout"
/>
Layout - Custom behavior
...more
{
...github.plone.volto,
...github.collective.awesome-volto,
...training.plone.org,
...community.plone.org
}
Thank you!
A story
brought to you by
to be continued by

More Related Content

PPTX
EEA Volto Add-ons - Plone Conference 2020
PDF
The Onion
KEY
Getting started with Selenium 2
PPTX
Don't Over-React - just use Vue!
PDF
Building Mobile Friendly APIs in Rails
KEY
JavaScript Testing VIA Selenium
PPTX
Secrets of a Blazor Component Artisan
ZIP
Mojolicious
EEA Volto Add-ons - Plone Conference 2020
The Onion
Getting started with Selenium 2
Don't Over-React - just use Vue!
Building Mobile Friendly APIs in Rails
JavaScript Testing VIA Selenium
Secrets of a Blazor Component Artisan
Mojolicious

What's hot (20)

PPT
Wookie Meetup
PDF
Progressive Enhancement
PDF
Desmistificando o Phonegap (Cordova)
PDF
jQuery Keynote - Fall 2010
ODP
Mojolicious on Steroids
PPTX
Web driver training
PDF
The Point of Vue - Intro to Vue.js
ODP
Beginning WordPress Plugin Development
PDF
Selenium webdriver
PDF
Beach Parasol
PDF
Intro to WordPress Plugin Development
KEY
Mojolicious - A new hope
PPTX
9. lower in Symfony 4
PDF
Nuxt.JS Introdruction
PDF
Automatic Functional Testing with Selenium and SauceLabs
PPTX
RubyConf Bangladesh 2017 - Elixir for Rubyists
PPT
You Know WebOS
PDF
Wordcamp 2010 presentation
PPT
Automation with Selenium Presented by Quontra Solutions
PPT
Django for n00bs
Wookie Meetup
Progressive Enhancement
Desmistificando o Phonegap (Cordova)
jQuery Keynote - Fall 2010
Mojolicious on Steroids
Web driver training
The Point of Vue - Intro to Vue.js
Beginning WordPress Plugin Development
Selenium webdriver
Beach Parasol
Intro to WordPress Plugin Development
Mojolicious - A new hope
9. lower in Symfony 4
Nuxt.JS Introdruction
Automatic Functional Testing with Selenium and SauceLabs
RubyConf Bangladesh 2017 - Elixir for Rubyists
You Know WebOS
Wordcamp 2010 presentation
Automation with Selenium Presented by Quontra Solutions
Django for n00bs
Ad

Similar to Plone 6 / Volto Dexterity Content Types - Schema & Layout (20)

PDF
Plone 6 - Volto: Past, Present and Future
PDF
Plone's API-first CMS story - Brasilia Plone Conference 2024
ODP
Plomino plone conf2010
PDF
Volto: Plone Conference 2018
PDF
The Plone is dead, long live the Plone!
PDF
Do you want to contribute to volto?
ODP
A winning combination: Plone as CMS and your favorite Python web framework as...
PDF
EEA Faceted Navigation and Plone 6.pdf
PDF
Plone
PPTX
Volto Unleashed - Real Life User Experience - Case Study Guide, University of...
PDF
Kotti CMS 101
PDF
Plone Futures
PDF
Plone Futures, Plone Conference 2016 Keynote by Eric Steele
ODP
Plone for python programmers
PDF
Asking questions for the benefit of your future self - Growing with the Plone...
PDF
Divide et impera
ODP
Introduction to Plone (PyCon Ireland 2010)
PPTX
Content delivery Plone Symposium East 2010
PDF
George Thiruvathukal, User Experiences with Plone Content Management
KEY
Plone api
Plone 6 - Volto: Past, Present and Future
Plone's API-first CMS story - Brasilia Plone Conference 2024
Plomino plone conf2010
Volto: Plone Conference 2018
The Plone is dead, long live the Plone!
Do you want to contribute to volto?
A winning combination: Plone as CMS and your favorite Python web framework as...
EEA Faceted Navigation and Plone 6.pdf
Plone
Volto Unleashed - Real Life User Experience - Case Study Guide, University of...
Kotti CMS 101
Plone Futures
Plone Futures, Plone Conference 2016 Keynote by Eric Steele
Plone for python programmers
Asking questions for the benefit of your future self - Growing with the Plone...
Divide et impera
Introduction to Plone (PyCon Ireland 2010)
Content delivery Plone Symposium East 2010
George Thiruvathukal, User Experiences with Plone Content Management
Plone api
Ad

More from Alin Voinea (14)

PDF
EEA and Plone Lightning at Plone Conference 2024 Brasilia
PPTX
EEA & Eau de Web Front-end add-ons - Plone conference 2023
PDF
Docker &amp; rancher
PDF
Continuous Delivery/Deployment w/ Gitflow, Docker, Jenkins and Rancher
PDF
Faceted navigation in Plone 5
PDF
Docker and plone
PDF
Plone and docker
PDF
Developing Single Page Applications on Plone using AngularJS
PDF
Responsive design in plone
PDF
Plone and docker
PPTX
Display eea’s semantic content with elasticsearch and node.js applications sh...
PPTX
New EEA Plone Add-ons
PDF
Python eggs (RO)
PDF
Data visualization in plone
EEA and Plone Lightning at Plone Conference 2024 Brasilia
EEA & Eau de Web Front-end add-ons - Plone conference 2023
Docker &amp; rancher
Continuous Delivery/Deployment w/ Gitflow, Docker, Jenkins and Rancher
Faceted navigation in Plone 5
Docker and plone
Plone and docker
Developing Single Page Applications on Plone using AngularJS
Responsive design in plone
Plone and docker
Display eea’s semantic content with elasticsearch and node.js applications sh...
New EEA Plone Add-ons
Python eggs (RO)
Data visualization in plone

Recently uploaded (20)

PDF
cuic standard and advanced reporting.pdf
PPTX
Cloud computing and distributed systems.
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
MYSQL Presentation for SQL database connectivity
cuic standard and advanced reporting.pdf
Cloud computing and distributed systems.
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Unlocking AI with Model Context Protocol (MCP)
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
20250228 LYD VKU AI Blended-Learning.pptx
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Building Integrated photovoltaic BIPV_UPV.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Review of recent advances in non-invasive hemoglobin estimation
Advanced methodologies resolving dimensionality complications for autism neur...
Encapsulation_ Review paper, used for researhc scholars
Reach Out and Touch Someone: Haptics and Empathic Computing
Agricultural_Statistics_at_a_Glance_2022_0.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Understanding_Digital_Forensics_Presentation.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Chapter 3 Spatial Domain Image Processing.pdf
MYSQL Presentation for SQL database connectivity

Plone 6 / Volto Dexterity Content Types - Schema & Layout

  • 1. Alin Voinea Eau de Web, Romania Plone 6 / Volto Dexterity Content Types Schema & Layout
  • 2. > foreward Python 3 Type "help" for more information. > forward Welcome to Node.js Type ".help" for more information. >>> import this >>> this.__dict__ { “name”: “Alin Voinea”, “github”: “avoinea”, “twitter”: “alinvoinea”, “slack”: “avoinea”, “mail”: “avoinea[]plone[]org”, “version”: 2020, “keywords”: [ “Volto”, “Plone”, “Python”, “Docker”, “Rancher”, “React”, “jQuery”, “DevOps”, ...more ]
  • 3. Content Types in Plone 6 / Volto ● Archetypes● Archetypes ● Dexterity Content Types ● Metadata ~ Schema ~ Layout● Blocks ● Behaviors
  • 4. Schema Schema Schema Schema Schema Schema Schema Schema Schema Schema Schema Schema Dexterity Content Types - Metadata
  • 5. Plone Schema ● How do we define Content-Types Schema: ○ TTW Schema Editor ○ GenericSetup profile ○ Behaviors
  • 6. TTW Schema Editor - Demo https://youtu.be/MACV_85_HgA
  • 7. Generic Profile XML <model> <schema> <field name="title" type="zope.schema.TextLine"> <title>Title</title> </field> <field name="description" type="zope.schema.Text"> <title>Description</title> </field> <field name="date" type="zope.schema.Datetime"> <title>Publishing Date</title> </field> </schema> </model>
  • 8. Behavior / Schema class ISchema(model.Schema): model.fieldset('default', label=_('Default'), fields=['title', 'description', 'date'], ) title = schema.TextLine( title=_('Title'), required=True ) description = schema.Text( title=_('Summary'), ) date = schema.Datetime( title=_('Publishing Date'), ) Python { "fieldsets": [ { "id": "default", "title": "Default" "fields": [ "title", "description", "date"], } ], "properties": { "title": { "title": "Title", "type": "string"}, "description": { "title": "Summary", "type": "string", "widget": "textarea"}, "date": { "title": "date", "type": "string", "widget": "datetime" }, } }, "required": [ "title" ], } RestAPI (JSON)
  • 9. Plone 6 / Volto Schemas
  • 10. Schema based frontend components import schema from './schema'; import InlineForm from '@plone/volto/components'; <InlineForm schema={schema} title={schema.title} formData={data} /> InlineForm import schema from './schema'; import Modal from '@plone/volto/components'; <ModalForm schema={schema} title={schema.title} formData={this.props.data} /> ModalForm import schema from './schema'; import Form from '@plone/volto/components'; <Form schema={schema} title={schema.title} formData={data} /> Form import schema from './schema'; import ObjectWidget from '@eeacms/volto-object-widget'; <ObjectWidget schema={schema} id={id} errors={errors} /> ObjectWidget import schema from './schema'; import SchemaWidget from '@plone/volto/components'; <SchemaWidget schema={schema} id={id} errors={errors} /> SchemaWidget
  • 11. Layout Layout Layout Layout Layout Layout Layout Layout Layout Layout Layout Layout Dexterity Content Types - Blocks
  • 12. Blocks Through the freedom that they provide, Volto blocks are a foundation for innovation that enables Plone to step in line with the latest state of the art for web development Tiberiu Ichim ...with freedom comes great responsibility Ronald Reagan
  • 15. Power to the ppl...
  • 16. Block’s properties Change position Remove Add new blocks Placeholder ReadOnly / Editable
  • 17. Block settings schema const Schema = { title: 'Block settings', fieldsets: [ { id: 'default', title: 'Default', fields: [ 'placeholder', 'required', 'fixed', 'disableNewBlocks', 'readOnly' ], }, ], properties: { 'placeholder': {...}, 'required': {...}, ... } };
  • 18. TTW Layout Editor - Demo https://youtu.be/yTToDfzXIvI
  • 19. Layout - Custom behavior behaviors.py @provider(IFormFieldProvider) class IDoTheZuLayout(model.Schema): model.fieldset( "layout", label=_(u"Layout"), fields=[ "blocks", "blocks_layout" ]) blocks = JSONField( title=u"Blocks", default=custom_blocks ) blocks_layout = JSONField( title=u"Blocks Layout", default=custom_blocks_layout ) custom_blocks = { "title": { "@type": "title", "placeholder": "Title here", "required": True, "fixed": True, }, "description": { "@type": "description", "placeholder": "Description here", }, "cover": { "@type": "image", "placeholder": "Cover image", "required": True, "fixed": True, }, } custom_blocks_layout = { "items": [ "title", "description", "cover", ] } configure.zcml <plone:behavior name="do.the.zu.layout" title="A Do The ZU Blocks Layout" description="Enables Volto Blocks support" provides=".behaviors.IDoTheZuLayout" />
  • 20. Layout - Custom behavior
  • 22. Thank you! A story brought to you by to be continued by