-
Notifications
You must be signed in to change notification settings - Fork 19
Architecture Content Types
Sam Richard edited this page Aug 16, 2016
·
1 revision
A structured, standardized, reusable, and mutually exclusive information entity.
name: Content Type
description: Foo Bar Baz
attributes: # is "attributes" the right name?
- type: INPUT-PLUGIN-NAME # matches module name in node or whatever
required: TRUE/FALSE # boolean, default false
label: NAME FOR WHOLE INSTANCE
id: UNIQUE-ID-FOR-PLUGIN-INSTANCE
description: PLUGIN INSTANCE DESCRIPTION # input instructions can go here too
repeatable: TRUE/FALSE # boolean, default false
settings: # settings specific to this Input Plugin
foo: SETTING `FOO` FOR PLUGIN INSTANCE
baz:
bar: SETTING `BAR` FOR PLUGIN INSTANCE
placeholder: please add BAR data # example of adding an attribute
onError:
baz: ERROR MESSAGE FOR `BAZ` ERROR MESSAGE
qux: ERROR MESSAGE FOR `QUX` ERROR MESSAGE
javascript:
local: # an array of overrides for an Input Plugin's local javascripts
- console.log("currency-field: Hello World")
- console.log("currency-field: Test2")
npm: # an array of overrides for an Input Plugin's npm-based javascripts
- scriptOne
- scriptTwo
- type: address
id: us-address
description: Enter your United States address
- type: address ## second use of same Input Plugin, with different parameters
id: canada-address
description: Enter your Canadian address
settings:
state:
label: Province
statesList: getCanadianProvinces ## how could we reference functions here? RSCH
zip:
label: Postal Code
pattern: '[A-Za-z][0-9][A-Za-z] [0-9][A-Za-z][0-9]'
- type: image
id: photos
label: Gallery Images
required: true
repeatable:: true
settings:
format: jpg
- type: number
id: age
required: true
label: Add your age
description: so we can be age-ist
onError: Age must be between {{settings.min}} and {{settings.max}}. You entered {{input}} # we can use variables
settings:
min: 18
max: 135
- type: number
id: weight
required: true
label: Add your weight
description: so we can be size-ist
onError:
low: You're Too Skinny
high: You're Too Big
- type: currency
required: true
label: Salary
description: so we can judge you
settings:
currency: USD
decimals: 2
- type: password
required: true
label: Hard password
settings:
pattern: REGEX that says "must have $ and LETTTERS"
- Built using code-based configuration
- Ability to manage all entries of a given Content Type.
- Add a new entry
- Update an entry
- Delete an entry
- Give an entry sunrise & sunset dates
- A sunrise date indicates when an entry may be available for public access
- A sunset date is when an entry will be removed from public access
- Differentiation between required to save and required to go live
- Store ñ revisions of each entry
- Store ñ language versions of each entry
- Be able to determine if content...
- Is scheduled to go live (sunrise);
- Is in a state that it can go live (publishing contract)
- All required to publish fields are filled out
- In a
publishable
state from workflow
- MYCROFT needs this too, should be separate module
- Integrate with publishing workflows
- Workflows are configured per-content-type
- Structure, workflows, and permissions of a given Content Type will be:
- Configurable via code
- Deployed as a file within each instance of the Holmes CMS
- Built from plugins defining how chunks should be input, validated, and saved
- see Input Plugins
- Preview an entry
- Share preview via link
- Search entries
- Searches all entries
- Ability to narrow search to a specific Content Type
- Handle multiple users working on same content
Each Content Type in Holmes will be created from a file-based configuration.
- Content Types are defined via code (through configuration files)
- Content Type configuration files will be deployed within CMS instance's repository
- Content Type configuration references Input Plugins to define chunks and structure
- Input Plugin references will point to the plugin's imported Node module
- Each reference will create a unique instance of an Input Plugin
- Multiple instances of the same Input Plugin may be used with the same Content Type
Working on Punchcard
Org Maintenance
Architecture Planning
These architectural discussions may be out-of-date given the current state of Punchcard.