@php $mode = $method=='edit' ? 'edit-mode':''; @endphp
{{-- 텍스트 타입 - lnk: 링크 - str: 내용 (nl2br: 줄바꿈이
태그로 변환됨, 따라서 줄바꿈까지 표시하려면 {!! 형식으로 처리해야 함) --}}
@php $cont = $Template->text('PAGE TITLE'); @endphp

{{ $cont->str }}

@php $cont = $Template->text('TITLE DESCRIPTION'); @endphp

{{ $cont->str }}

@php $cont = $Template->text('페이지설명'); @endphp
{!! $cont->str !!}
{{-- Custom List 타입 - 'INCLUDE' => 'sample/custom', (경로) - 'IMAGE' => 'background' (라벨) - 변수 (공백없이) --}}
@php $list = $Template->customList('Custom Test', [ 'IMAGE' => 'Image', 'IMAGE2' => 'Image', 'IMAGE3' => 'Image', 'INCLUDE' => 'sample/custom', 'INCLUDE2' => 'sample/custom', 'cnt', 'h1', 'h2' ]); @endphp @if(!empty($list)) @foreach($list as $cont)
@if(!empty($cont->h1))

{{ $cont->h1 }}

@endif @if(!empty($cont->h2))

{{ $cont->h2 }}

@endif @if(!empty($cont->INCLUDE)) @include('edmuhak.template.include.'.$cont->INCLUDE, ['cnt'=> !empty($cont->cnt) ? $cont->cnt:'']) @endif @if(!empty($cont->INCLUDE2)) @include('edmuhak.template.include.'.$cont->INCLUDE2, ['cnt'=> !empty($cont->cnt) ? $cont->cnt:'']) @endif
@if(!empty($cont->IMAGE)) @endif @if(!empty($cont->IMAGE2)) @endif
@if(!empty($cont->IMAGE3)) @endif
@endforeach @endif
{{-- 게시판 타입: 게시판 스킨과 동일한 변수 사용 --}}
@php $cont = $Template->text('공지사항 제목'); @endphp

{{ $cont->str }}

@php $articles = $Template->bbs('공지사항'); @endphp
{{-- 학교 타입: School Eloquent Object --}}
@php $cont = $Template->text('학교목록 제목'); @endphp

{{ $cont->str }}

@php $schools = $Template->school('학교목록'); @endphp @if (!empty($schools))
    @foreach ($schools as $school)
  • @if (!empty($school->thumb[0])) {{ $school->school_name }} @else @endif

    {{ $school->school_name }}

    @if(!empty($school->logo)) @endif
    {{ getFirstText($school->school_feature) }}
    {{ $school->school_city_ko }}, {{ $school->country_name }} @if ($school->uhak_type==1) {{ $school->ext->last_course->course_title }} {{ $school->ext->last_course->course_req_year }} {{ !empty($school->ext->last_course->costs[0]->week) ? $school->ext->last_course->costs[0]->week:'' }}주 등록 시 {!! !empty($school->ext->last_course->costs[0]->fee_krw) ? '₩'.number_format($school->ext->last_course->costs[0]->fee_krw):'' !!} @endif
  • @endforeach
@endif
{{-- 리스트 타입: 리스트 항목이 배열로 저장되어 반환되므로, foreach 로 각 항목 추출 - class: 클래스 이름 - lnk: 링크 - src: 이미지 경로 - alt: 이미지 설명 - str: 내용 --}}
@if ($method=='edit')
class는 카테고리, alt는 소제목으로 사용하시면 됩니다.
@endif @php $list = $Template->list('리스트'); @endphp
{{-- 테이블 타입 - header: 테이블 헤더 (th) - rows: 열 갯수 - cols: 행 갯수 - cells[]: 각 셀 텍스트 --}}
@php $table = $Template->table('테이블'); @endphp @php $c = 0; @endphp @for($i=0; $i < $table->rows; $i++) @for($x=0; $x < $table->cols; $x++) @if($i==0 and $table->header) @else @endif @php $c++; @endphp @endfor @endfor @if (!empty($table->caption)) @endif
{{ $table->cells[$c] }}{!! $table->cells[$c] !!}
{{ $table->caption }}
{{-- 에디터 타입 --}}
@php $html = $Template->editor('editor sample'); @endphp {!! $html !!}
{{-- 이미지 타입 (추가 파라미터 (1): user PC image) - lnk: 링크 - src: 이미지 경로 - alt: 이미지 설명 - str: 내용 --}}
@php $img = $Template->image('Responsive Image', 1); @endphp
{{ $img->alt }}
{{-- include /include 폴더 내의 blade는 템플릿 선택목록에 표시되지 않음 - include 용으로만 사용됨 --}}
@include('edmuhak.template.include.sample.sample')