Developer Cloud Service로 콘텐츠 레이아웃 생성

cec create-contentlayout 명령을 사용하여 Developer Cloud Service 프로젝트에서 콘텐츠 유형에 대한 콘텐츠 레이아웃을 생성할 수 있습니다.

Developer Cloud Service 프로젝트에서 콘텐츠 레이아웃을 생성하려면 다음과 같이 하십시오.

  1. 터미널 창에서 cec-components 디렉토리로 이동합니다.

  2. 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
  3. 다음 명령을 입력하여 서버에서 사용 가능한 콘텐츠 유형을 확인합니다.

    cec list-server-content-types
  4. "Usage"에 표시된 대로, Oracle Content Management 서버의 콘텐츠 유형 또는 cec-components/src/main/templates 아래 템플리트의 콘텐츠 유형에 대한 콘텐츠 레이아웃을 생성할 수 있습니다. 예를 들어, 다음 명령은 서버의 유형에 대한 콘텐츠 레이아웃을 생성합니다.

    cec create-contentlayout Blog-Post-Overview-Layout -c Blog-Post -r

다음 파일을 편집하여 콘텐츠 레이아웃을 수정할 수 있습니다.

사용자정의 설정을 허용하는 레이아웃을 생성한 경우(레이아웃을 생성할 때 -a 옵션 사용), 단일 콘텐츠 항목의 기본 렌더링을 표시할 수 있도록 제공하는 settings.html이라는 추가 파일도 생성됩니다.