#assign liferay_ui = taglibLiferayHash["/WEB-INF/tld/liferay-ui.tld"] />
<#assign structureService = serviceLocator.findService('com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService') />
<#assign templateService = serviceLocator.findService('com.liferay.portlet.dynamicdatamapping.service.DDMTemplateLocalService') />
<#assign ClassNameLocalServiceUtil = serviceLocator.findService('com.liferay.portal.service.ClassNameLocalService') />
<#assign journalClassNameId = portalUtil.getClassNameId("com.liferay.portlet.journal.model.JournalArticle") />
<#assign newsTemplateId = "" />
<#assign noticeTemplateId = "" />
<#if entries?has_content>
<#list entries as curEntry>
<#assign assetRenderer = curEntry.getAssetRenderer() />
<#if assetRenderer.getClassName() == "com.liferay.portlet.journal.model.JournalArticle">
<#assign article = assetRenderer.getArticle() />
<#assign tplKey = article.getTemplateId() >
<#assign ddmStructure = structureService.fetchStructure(article.getGroupId(), journalClassNameId, article.getStructureId())/>
<#if ddmStructure?has_content >
<#if ddmStructure.getName(locale) == "News" >
<#if !newsTemplateId?has_content >
<#assign templates = templateService.getTemplatesByClassPK(article.getGroupId(), ddmStructure.getStructureId()) />
<#if templates?has_content>
<#list templates as tpl >
<#if tpl.getName(locale) == "News Carousel" >
<#assign newsTemplateId = tpl.templateKey >
#if>
#list>
#if>
#if>
<#assign tplKey = newsTemplateId >
<#elseif ddmStructure.getName(locale) == "Notice" >
<#if !noticeTemplateId?has_content >
<#assign templates = templateService.getTemplatesByClassPK(article.getGroupId(), ddmStructure.getStructureId()) />
<#if templates?has_content>
<#list templates as tpl >
<#if tpl.getName(locale) == "Notice Carousel" >
<#assign noticeTemplateId = tpl.templateKey >
#if>
#list>
#if>
#if>
<#assign tplKey = noticeTemplateId >
#if>
#if>
<@liferay_ui["journal-article"]
articleId=article.getArticleId()
groupId=article.getGroupId()
templateId=tplKey />
#if>
#list>
#if>
<#if entries?has_content>
<#assign count = 0>
<#list entries as curEntry>
${curEntry.getTitle(locale)}
<#assign count = count + 1>
#list>
#if>