2017-09-18 8 views
1

부분 블록에 대한 html을 렌더링하고 해당 부분의 코드 예제를 생성하는 도우미를 만들려고합니다.처리 된 블록과 처리되지 않은 블록을 핸들 바에 출력 할 수 있습니까?

예를이를 위해 :

<div class="wrapper"> 
    {{> first}} 
    {{> second}} 
</div> 

이 생성해야합니다

html: 
---------- 
<div class="wrapper"> 
    <div>first</div> 
    <div>second</div> 
</div> 
---------- 
example: 
---------- 
<div class="wrapper"> 
    {{> first}} 
    {{> second}} 
</div> 

가 나는 {{{{raw}}}} 블록 도우미 또는 \{{{escape}}}}을 사용할 수 있습니다, 이것은 예 아니라 html로 작동합니다. 다음과 같이 코드에서 내 자신을 반복하지 않고 두 가지 방법으로 출력 할 수 있습니까?

<div class="wrapper"> 
    {{> first}} 
    {{> second}} 
</div> 

<div class="wrapper"> 
    \{{> first}} 
    \{{> second}} 
</div> 

이게 가능합니까?

답변