The attribute module provides method to manipulate content object & content class attributes.
- delete
- newattributexml
- migrate
- update
- fromstring
- tostring
- setfield
- getfield
- set
- get
- info
- createalias
- contentobjectid
Deletes an attribute from a content class and it's content objects.
$ eep attribute delete <class identifier> <attribute identifier>
Displays XML that can be edited and used for import.
$ eep attribute newattributexml
Copies data from one content object attribute to another within a content class.
- Currently supported are
rot13
for testing andtime2integer
andtrim
anddate2ts
$ eep attribute migrate <class identifier> <src attribute> <conversion> <dest attribute>
Updates content class and content objects with new attribute; will resume after a partial update.
$ eep attribute update <class identifier> <path to newattributexml file>
Calls FromString() on the content object data_map's attribute.
$ eep attribute fromstring <content object id> <attribute identifier> <new value>
Calls ToString() on the content object data_map's attribute.
$ eep attribute tostring <content object id> <attribute identifier>
Directly sets one of the content class attribute fields (e.g. data_int
, data_text1
etc.)
$ eep attribute setfield <class identifier> <attributename> <fieldname> <fieldvalue>
Directly gets one of the content class attribute fields (e.g. data_int
, data_text1
etc.)
$ eep attribute getfield <class identifier> <attributename> <fieldname> <fieldvalue>
Directly sets one of the contentobject attributes (e.g. owner_id, published etc.)
$ eep attribute set <content object id> <attribute identifier> <attribute value>
Directly gets one of the contentobject attributes (e.g. owner_id, published etc.)
$ eep attribute get <content object id> <attribute identifier> <attribute value>
Displays all content class attribute fields (e.g. data_int
, data_text1
etc.)
$ eep attribute info <class identifier> <attributename> <fieldname>
Create a given alias manually for a given content object image attribute.
$ eep attribute createalias <content object id> <attribute identifier> <alias name>
Returns the contentobject id from a contentobject attribute id.
eep attribute contentobjectid <content object _attribute_ id> [<version>]
Tip
Amongst other things this method can be used to find out which content object images in the /var/<yoursite>/storage/
folder belong to.
The image path contains folders in the following format:
<contentobject_id>-<contentobject_version>-<contentobject_language>
i.e. 23929-1-eng-CA
for the 1st version of a content object for english (Canada)
Those IDs could be extracted via grep
and then passed to eep attribute contentobjectid ...
via xargs
.