데이터가 비어 있지 않으면 동적으로 표시하려고하고 해당 항목에 대한 데이터가없는 경우 헤더를 비어있게 설정하려고합니다.Kentico 10 변환 참조
다음은 나의 변환 코드입니다. 데이터가없는 h5 제목을 숨기려고합니다.
예를 들어, CurrentDocument.EVAl ("Client")가 다시 비어있는 경우 "client-heading"클래스 전체를 숨기고 싶습니다. 나는 그것이 과 관련이 있다고 가정합니다! IfEmpty.
<div class="left-data small-6 medium-3 large-3 columns">
<div class="location-heading">
<h5 class="data-heading">Location:</h5>
<h5>{% CurrentDocument.GetValue("City") #%}, {% CurrentDocument.GetValue("State") #%}</h5>
</div>
<div class="client-heading">
<h5 class="data-heading">Client:</h5>
<h5>{% CurrentDocument.EVAL("Client") #%}</h5>
</div>
<div class="year-heading">
<h5 class="data-heading">Year Completed:</h5>
<h5>{% CurrentDocument.GetValue("yearCompleted") #%}</h5>
</div>
나는 이것을 줄 것이다. ASCX 및 매크로 변형 방법을 살펴 보겠습니다. –
완벽하게 작동했습니다! –