A version holds data to all fields assigned to an entry.

If you want to display content, not modify it, you're better of using the PageApi accessible through the FrontendApi via Api.getFrontend.

Only one version can be published for any of the project's languages.

Constructor

@:keepnew (version:EntryVersion)

Variables

@:keepread onlymodified:String

Get the last modified date in string format

@:keepread onlypublished:Bool

True if this version is currently published

Methods

@:keepgetFieldData (key:String):JSONValue

Returns field data, this can be a string, bool, number, array or object

@:keephasField (key:String):Bool

Check if field exists for this version

@:keeppublish ():EntryVersionApi

Publish this version

@:keepsave ():EntryVersionApi

After using setField to alter field data, use the save function to write the changes to the database

@:keepsetFieldData (key:String, data:JSONValue):EntryVersionApi

Change a field's data

@:keepunpublish ():EntryVersionApi

Unpublish this version