cec create-contentlayout
komutu ile Geliştirici Bulut Hizmeti projenizde bir içerik tipine yönelik olarak bir içerik yerleşimi oluşturabilirsiniz.
Geliştirici Bulut Hizmeti projenizde bir içerik yerleşimi oluşturmak için:
Bir terminal penceresinde, cec-components
dizinine gidin.
Komut için seçenekleri ve örnekleri görmek için cec create-contentlayout
girin:
Usage: cec create-contentlayout <name> Creates a content layout based on a content type from a local template or from CEC server. By default, an "overview" content layout is created. Optionally specify -s <style> to create in a different style. Valid values for <style> are: detail overview Options: --contenttype, -c <contenttype> Content layout is based on [required] --template, -t <template> Content type is from --server, -r flag to indicate the content type is from server --style, -s <style> Content layout style --addcustomsettings, -a Add support for custom settings when used in Sites --help, -h Show help [boolean] Examples: cec create-contentlayout Blog-Post-Overview-Layout -c Blog-Post -t BlogTemplate cec create-contentlayout Blog-Post-Detail-Layout -c Blog-Post -t BlogTemplate -s detail cec create-contentlayout Blog-Post-Overview-Layout -c Blog-Post -t BlogTemplate -a cec create-contentlayout Blog-Post-Overview-Layout -c Blog-Post -r cec create-contentlayout Blog-Post-Overview-Layout -c Blog-Post -r -s detail
Sunucunuzda kullanılabilen içerik tiplerini görmek üzere şu komutu girin:
cec list-server-content-types
"Kullanım" içinde gösterildiği gibi, Oracle Content Management sunucusundaki içerik tipine veya cec-components/src/main/templates
altındaki şablonlardaki içerik tipine yönelik bir içerik yerleşimi oluşturabilirsiniz. Örnek olarak, şu komut sunucudaki dosya için içerik yerleşimini oluşturur:
cec create-contentlayout Blog-Post-Overview-Layout -c Blog-Post -r
İçerik yerleşimini değiştirmek için şu dosyaları düzenleyebilirsiniz:
assets/layout.html
Bu dosya HTML görünümünü belirtir. Bkz. Mustache Şablonunda İçerik Yerleşimini Düzenleme.
assets/design.css
Bu dosya, içerik yerleşimine yönelik stili belirtir. Bkz. design.css Dosyasında Stil Tanımlama.
assets/render.js
Bu dosyada, layout.html
içinde kullanılacak veriler belirtilir ve içerik yerleşimine dinamik davranış eklemeniz sağlanır. Bkz. RequireJS Modülünü Tanımlama.
Özel ayarlara izin veren bir yerleşim oluşturduysanız (yerleşim oluşturulurken -a
seçeneği kullanılarak), görüntülenebilmesi için tek bir içerik öğesinin gösterim öndeğerini sağlayan settings.html
adlı ek bir dosya da oluşturulur.