콘텐츠로 이동

노드 템플릿 구현

SI-DATA 문서 / SI-DATA 신규 콘텐츠 설계 문서 / 구현

작성일: 2026-01-15
버전: 1.0


신규 콘텐츠 타입의 노드 템플릿 구현에 대한 문서입니다.


web/themes/custom/datasi/templates/node/
├── node--data-content--full.html.twig
├── node--dxpr-content--full.html.twig
├── node--report-content--full.html.twig
├── node--html-content--full.html.twig
├── node--survey-content--full.html.twig
├── node--heritage-content--full.html.twig
└── node--photo-content--full.html.twig

<section class="fc01">
<div class="inner">
<article class="tc01" id="nid-{{ node.id }}">
<div class="header">
{% if node.field_chapter.entity %}
<dl class="service">
<dd>{{ node.field_chapter.entity.name.value }}</dd>
</dl>
{% endif %}
<h1>{{ label }}</h1>
</div>
<div class="bodyA">
{{ content|without('field_chapter') }}
</div>
</article>
</div>
</section>

항목
위치제목(<h1>) 위에 소제목으로 표시
필드field_chapter (카테고리)
출력 방식노드 엔티티에서 직접 택소노미 term 이름 출력
코드{{ node.field_chapter.entity.name.value }}

web/themes/custom/datasi/templates/field/
└── field--field-chapter.html.twig

카테고리 필드는 래퍼 없이 term 이름만 출력:

{% for item in items %}
{{ item.content }}
{% endfor %}


버전날짜변경 내용
1.02026-01-15초기 문서 작성