cec create-contentlayout
명령을 사용하여 Developer Cloud Service 프로젝트에서 콘텐츠 유형에 대한 콘텐츠 레이아웃을 생성할 수 있습니다.
Developer Cloud Service 프로젝트에서 콘텐츠 레이아웃을 생성하려면 다음과 같이 하십시오.
터미널 창에서 cec-components
디렉토리로 이동합니다.
cec create-contentlayout
을 입력하여 명령 옵션 및 예제를 확인합니다.
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
다음 명령을 입력하여 서버에서 사용 가능한 콘텐츠 유형을 확인합니다.
cec list-server-content-types
"Usage"에 표시된 대로, Oracle Content Management 서버의 콘텐츠 유형 또는 cec-components/src/main/templates
아래 템플리트의 콘텐츠 유형에 대한 콘텐츠 레이아웃을 생성할 수 있습니다. 예를 들어, 다음 명령은 서버의 유형에 대한 콘텐츠 레이아웃을 생성합니다.
cec create-contentlayout Blog-Post-Overview-Layout -c Blog-Post -r
다음 파일을 편집하여 콘텐츠 레이아웃을 수정할 수 있습니다.
assets/layout.html
이 파일은 HTML 뷰를 지정합니다. Mustache 템플리트에서 콘텐츠 레이아웃 편집을 참조하십시오.
assets/design.css
이 파일은 콘텐츠 레이아웃의 스타일을 지정합니다. design.css 파일에서 스타일 정의를 참조하십시오.
assets/render.js
이 파일은 layout.html
에서 사용된 데이터를 지정하며 콘텐츠 레이아웃에 동적 동작을 추가할 수 있습니다. RequireJS 모듈 정의를 참조하십시오.
사용자정의 설정을 허용하는 레이아웃을 생성한 경우(레이아웃을 생성할 때 -a
옵션 사용), 단일 콘텐츠 항목의 기본 렌더링을 표시할 수 있도록 제공하는 settings.html
이라는 추가 파일도 생성됩니다.