Sada nástrojů OCE Toolkit poskytuje podporu pro vývoj komponent typu Vzhled pole. Vývojáři mohou vytvářet vlastní editory polí a provádět jejich správu.
Pro komponentu typu Vzhled pole můžete provádět následující úlohy:
Seznam komponent můžete filtrovat podle typu Vzhled pole.
Pro vývoj vlastních editorů polí jsou dostupné následující příkazy sady nástrojů OCE Toolkit:
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
Tyto ukázky komponent typu Vzhled pole jsou součástí sady nástrojů OCE Toolkit:
TextFieldEditor
SliderFieldEditor
MapFieldEditor
Na následujícím obrázku jsou uvedeny příkazy sady nástrojů OCE Toolkit, které můžete použít k vývoji ukázkových komponent typu Vzhled pole.
Na místním serveru můžete vytvářet komponenty typu Vzhled pole připravené k okamžitému použití, testovat je a poté odeslat do instance služby Oracle Content Management. Na následujícím obrázku jsou zobrazeny tyto komponenty na místním hostiteli localhost:8085
.
Každou komponentu, jako je posuvník, můžete vyzkoušet na místním serveru. Zde můžete vybrat vlastnosti komponenty a poté ji uložit.
U komponenty mapa můžete kliknutím na mapu určit polohu jako hodnotu editoru.
Můžete upravit soubor HTML komponenty, a změnit tak její nastavení, například barvu pozadí.
Pomocí příkazu sady nástrojů OCE Toolkit můžete místně přiřadit editor polí k poli typu obsahu:
cec add-field-editor editor1 -t SimpleContent -n -c SimpleType -f title cec add-field-editor slider -t SimpleContent -n -c SimpleType -f value
Když dokončíte konfiguraci a testování vlastních editorů polí, můžete je odeslat do své instance služby Oracle Content Management pomocí příkazů sady nástrojů OCE Toolkit:
# upload editors cec ulcp editor1,slider -p -s Latest # upload content cec cr Repo5 -s cec upload-content SimpleContent -r Rpo5 -s
Když odešlete vlastní editory polí, vaše komponenty budou importovány do vaší instance služby Oracle Content Management.