Skip to content

Instantly share code, notes, and snippets.

@benald
Last active October 12, 2018 05:19
Show Gist options
  • Save benald/b34f6c740853934fb85203b5f0ccf230 to your computer and use it in GitHub Desktop.
Save benald/b34f6c740853934fb85203b5f0ccf230 to your computer and use it in GitHub Desktop.
<#assign imageManagerService = serviceLocator.findService('IMAGE_MANAGER','helper') />
<div class="eds-c-panel">
<div class="inner-wrapper eds-c-content-view">
<#if Article.getSiblings()?has_content>
<#list Article.openingGroupSection.getSiblings() as cur_openingGroupSection>
<div class="row">
<div class="col-md-10 col-md-offset-1 eds-u-flush">
<#if cur_openingGroupSection.openingSectionLead.getData()?has_content && cur_openingGroupSection.openingSectionLead.getData() != '<p>&nbsp;</p>'>
<p class="eds-c-feature-paragraph">${cur_openingGroupSection.openingSectionLead.getData()}</p>
</#if>
</div>
</div>
</#list>
<#list Article.sliderGroup.getChildren() as cur_sliderGroup>
<div class="owl-carousel owl-theme">
<#list cur_sliderGroup.getSiblings() as cur_sliderItem>
<div>
<#assign imageId = getterUtil.getLong(cur_sliderItem.sliderImage.getData()) >
<#assign imageObj = imageManagerService.getImageObject(imageId) />
<#assign altText = imageObj.getAltText() >
<#assign myImage=(cur_sliderItem.sliderImage.data)!"image value didn't exist, but does now!">
<#if myImage?has_content>
<img src="${myImage}" class="img-responsive" alt=""/>
<#else>no image</#if>
<#if cur_sliderItem.sliderTitle.getData()?has_content>
<div class="caption">
<h2>${cur_sliderItem.sliderTitle.getData()}</h2>
<#if cur_sliderItem.sliderCaption.getData()?has_content>
<p>${cur_sliderItem.sliderCaption.getData()}</p>
</#if>
<#if cur_sliderItem.sliderLink.getData()?has_content>
<a href="${cur_sliderItem.sliderLink.getData()}">More</a>
</#if>
</#if>
</div>
</div>
</#list>
</div>
</#list>
<#list Article.closingGroupSection.getSiblings() as cur_closingGroupSection>
<div class="row">
<div class="col-md-10 col-md-offset-1 eds-u-flush">
<#if cur_closingGroupSection.closingSectionText.getData()?has_content && cur_closingGroupSection.closingSectionText.getData() != '<p>&nbsp;</p>'>
<p class="eds-c-feature-paragraph">${cur_closingGroupSection.closingSectionText.getData()}</p>
</#if>
</div>
</div>
</#list>
</#if>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment