Инструментарий OCE поддерживает разработку компонентов типа "Внешний вид поля". Разработчики могут создавать пользовательские редакторы полей и управлять ими.
Для компонента типа "Внешний вид поля" можно выполнить следующие задачи:
Список компонентов можно фильтровать по типу "Внешний вид поля".
Для разработки пользовательских редакторов полей доступны следующие команды инструментария OCE:
cec add-field-editor <name> Adds a field editor to a field in a content type. [alias: afe] cec remove-field-editor <name> Removes a field editor from a field in a content type. [alias: rfe] ------------------------ cec add-field-editor ------------------------ Usage: cec add-field-editor <name> Adds a field editor to a field in a content type. Options: --template, -t The template the content type is from [required] --contenttype, -c The content type [required] --field, -f The field the field editor is for [required] --contenttemplate, -n Flag to indicate the template is a content template --help, -h Show help [boolean] Examples: cec add-field-editor editor1 -t BlogTemplate -c BlogPost -f summary Use editor1 as the appearance for field summary in content type BlogPost from local template at src/templates/BlogTemplate cec add-field-editor editor1 -t BlogTemplateContent -n -c BlogPost -f summary Use editor1 as the appearance for field summary in content type BlogPost from local template at src/content/BlogTemplateContent ------------------------ cec remove-field-editor ------------------------ Usage: cec remove-field-editor <name> Removes a field editor from a field in a content type. Options: --template, -t The template the content type is from [required] --contenttype, -c The content type [required] --field, -f The field the field editor is for [required] --contenttemplate, -n Flag to indicate the template is a content template --help, -h Show help [boolean] Examples: cec remove-field-editor editor1 -t BlogTemplate -c BlogPost -f summary Remove editor1 as the appearance for field summary in content type BlogPost from local template at src/templates/BlogTemplate cec remove-field-editor editor1 -t BlogTemplateContent -n -c BlogPost -f summary Remove editor1 as the appearance for field summary in content type BlogPost from local template at src/content/BlogTemplateContent
Эти образцы компонентов внешнего вида поля входят в инструментарий OCE:
TextFieldEditor
SliderFieldEditor
MapFieldEditor
На рисунке ниже показаны команды инструментария OCE, которые можно использовать для разработки образцов компонентов внешнего вида поля.
Можно создать на локальном сервере компоненты внешнего вида поля, протестировать их и загрузить в экземпляр Oracle Content Management. На рисунке ниже показаны эти компоненты в узле localhost:8085
.
На локальном сервере можно протестировать любой компонент, например ползунок. Здесь можно выбрать свойства компонента и сохранить его.
В случае компонента карты можно нажать на карту, чтобы указать местоположение в качестве значения редактора.
Можно отредактировать HTML-файл компонента, чтобы изменить его настройки, такие как цвет фона.
С помощью команды инструментария OCE можно локально связать редактор полей с полем типа контента:
cec add-field-editor editor1 -t SimpleContent -n -c SimpleType -f title cec add-field-editor slider -t SimpleContent -n -c SimpleType -f value
После завершения настройки и тестирования пользовательские редакторы полей можно загрузить в экземпляр Oracle Content Management с помощью команд инструментария OCE:
# upload editors cec ulcp editor1,slider -p -s Latest # upload content cec cr Repo5 -s cec upload-content SimpleContent -r Rpo5 -s
При загрузке пользовательских редакторов полей компоненты импортируются в экземпляр Oracle Content Management.