Verktygen för OCE tillhandahåller stöd för utveckling av komponenter av typen Fältformat. Utvecklare kan skapa och hantera anpassade fältredigerare.
För en komponent av typen Fältformat kan du utföra följande uppgifter:
Du kan filtrera en lista över komponenter per typen Fältformat.
Följande kommandon i verktygen för OCE finns tillgängliga för att utveckla anpassade fältredigerare:
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
Dessa exempel på fältformatskomponenter inkluderas i verktygen för OCE:
TextFieldEditor
SliderFieldEditor
MapFieldEditor
I följande bild visas de kommandon i verktygen för OCE som du kan använda för att utveckla exempelkomponenterna av typen Fältformat.
Du kan skapa de färdigkonfigurerade fältformatskomponenterna på den lokala servern, testa dem och sedan ladda upp dem till instansen av Oracle Content Management. I följande bild visas dessa komponenter på localhost:8085
.
Du kan testa varje komponent, t.ex. skjutreglage, på den lokala servern. Där kan du välja egenskaper för komponenten och sedan spara den.
För kartkomponenten kan du klicka runt på kartan för att ange en plats som redigerarvärde.
Du kan redigera HTML-filen för en komponent för att ändra dess inställningar. t.ex. bakgrundsfärg.
Du kan använda ett kommando i verktygen för OCE för att associera en fältredigerare med ett fält i en innehållstyp lokalt:
cec add-field-editor editor1 -t SimpleContent -n -c SimpleType -f title cec add-field-editor slider -t SimpleContent -n -c SimpleType -f value
När du har slutfört konfigurationen och testningen av de anpassade fältredigerarna kan du ladda upp dem till instansen av Oracle Content Management, med hjälp av kommandon i OCE Toolkit:
# upload editors cec ulcp editor1,slider -p -s Latest # upload content cec cr Repo5 -s cec upload-content SimpleContent -r Rpo5 -s
När du laddar upp de anpassade fältredigerarna importeras komponenterna till instansen av Oracle Content Management.