Skip to content

Latest commit

 

History

History
108 lines (94 loc) · 3.41 KB

modules_contentclass.md

File metadata and controls

108 lines (94 loc) · 3.41 KB

Modules - contentclass

The contentclass module provides methods to manipulate content classes.

appendtogroup

Append the content class to the content class group. Note, a class can exist in more than one group.

$ eep contentclass appendtogroup <content class identifier> <group identifier>

createclass

Creates a stub content class with an automatic content class identifier and default string for object-naming; uses the "admin" user to create the class; returns the class identifier so that attributes can then be added and the default naming be updated.

$ eep createclass <display name> <content class group identifier>

deleteclass

Deletes all the instances of a class, and then deletes the class itself.

$ eep use ezroot <path>
$ eep use contentclass <class identifier>
$ eep contentclass deleteclass
or
$ eep use ezroot <path>
$ eep contentclass deleteclass <class identifier>

fetchallinstances

Fetches all instances of a contentclass. Note that this supports limit and offset parameters.

$ eep use ezroot <path>
$ eep use contentclass <class identifier>
$ eep contentclass fetchallinstances
or
$ eep contentclass fetchallinstances <content class identifier> [--limit=nnn] [--offset=nnn]

info

Dumps the internal fields and values that ez uses to specify a content class. These can be edited with eep setfield.

$ dumps the internal fields that ez manages for the content class, like 'url pattern' and etc.

listattributes

Lists all class attributes.

$ eep use ezroot <path>
$ eep use contentclass <class identifier>
$ eep contentclass listattributes

removefromgroup

Removes a contentclass from a contentclass group.

$ eep use ezroot <path>
$ eep contentclass removefromgroup <content class identifier> <group identifier>

setclassobjectidentifier

Sets the string used to name instances of the class, uses the same syntax as in the admin UI.

$ eep contentclass setclassobjectidentifier <class identifier> <object naming string or pattern>

setfield

Set any of the internal fields that ez manages for the content class, see eep info for the list of fields and values.

$ eep contentclass setfield <content class identifier> <field name> <new value>

setiscontainer

Sets or unsets the 'is container' flag on the class.

$ eep contentclass setiscontainer <class identifier> <0|1>

translationcreate

Add a new translation for the content class, optionally copy the translation from an existing one. Note that 'locale's are, eg., eng-GB or eng-US

$ eep contentclass translationcreate <class identifier> <new locale> [<existing locale>]

translationsetmain

Set the main translation, eg. in preparation to removing eng-GB as a supported translation.

$ eep contentclass translationsetmain <class identifier> <locale>

translationremove

Remove a translation from the content class.

$ eep contentclass translationremove <class identifier> <locale>