1<#assign assetCategoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") />
2<#assign layoutLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService") />
3<#assign layouts = layoutLocalService.getLayouts(themeDisplay.getScopeGroupId(), false) />
4<#assign welboaService = serviceLocator.findService("com.once.welboa.service.api.WelboaService") />
5<#assign welboaParentGroupId = themeDisplay.getScopeGroup().getParentGroupId()/>
6<#assign welboaGroupId = themeDisplay.getScopeGroupId()/>
7
8<#if welboaService.getBoletin(request, themeDisplay)?? >
9 <#assign welboaBoletin = welboaService.getBoletin(request, themeDisplay) />
10
11 <#if welboaService.getLayoutAssetEntry(request)?has_content>
12
13 <#assign currentEntry = welboaService.getLayoutAssetEntry(request)/>
14 <#assign categoriesDelArticulo = currentEntry.getCategories() />
15 <#assign
16 categories = assetCategoryLocalService.getCategories("com.liferay.journal.model.JournalArticle", currentEntry.classPK?number)
17 />
18
19 <#if categoriesDelArticulo?has_content && categoriesDelArticulo[0].categoryId == categories[0].categoryId>
20
21 <#assign categorySeccion = categories[0] />
22
23 <#assign articulos = welboaService.getArticulosByCategory(groupId, welboaBoletin, categories) />
24 <#if articulos?has_content>
25 <#assign numArticulos = articulos?size />
26 <#assign colClass = "col-lg-8 mb-5" />
27 <#if ((numArticulos == 1) || (numArticulos == 2))>
28 <#assign colClass = "col-lg-6 mb-5" />
29 <#else>
30 <#assign colClass = "col-lg-4 mb-5" />
31 </#if>
32 <#assign indexA = 0 />
33 <#if (numArticulos > 1) && categories?has_content >
34 <div class="linea-welboa-masarticulos row m-sm-1 m-md-5 justify-content-center pt-4">
35
36 <h2 class = "text-left pt-5 pb-5 col-12"> Más noticias de ${categorySeccion.name}</h2>
37 <#list articulos as curEntry>
38
39 <div class="${colClass}">
40 <#if welboaService.areAssetsRelated(curEntry,welboaBoletin)>
41 <#assign
42 assetRenderer = curEntry.getAssetRenderer()
43 journalArticle = assetRenderer.getAssetObject()
44 />
45 <@liferay_journal["journal-article"]
46 articleId=journalArticle.getArticleId()
47 ddmTemplateKey="TPL_WELBOA_PIEDETALLEART"
48 groupId=journalArticle.getGroupId()
49 />
50 </#if>
51 </div>
52 <#if (indexA == 2) >
53 <#break>
54 </#if>
55 <#assign indexA = indexA + 1 />
56
57 </#list>
58 </#if>
59 </#if>
60 <#assign
61 entry = currentEntry
62
63 assetRenderer = entry.getAssetRenderer()
64
65 entryTitle = htmlUtil.escape(assetRenderer.getTitle(locale))
66
67 viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, assetRenderer, entry, !stringUtil.equals(assetLinkBehavior, "showFullContent"))
68 />
69 <#assign boletinEntry = welboaService.obtenerAssetEntry(welboaBoletin) />
70 <#assign seccionesDelArticulo = welboaService.getSeccionesByArticulo(request, themeDisplay, currentEntry, boletinEntry ) />
71 <#assign index = 0 />
72 <#list seccionesDelArticulo as seccion>
73 <#assign categoryArticulo = categoriesDelArticulo[index] />
74 <#assign friendlyUrlSeccion = seccion.urlTitle />
75 <#assign site_default_url = htmlUtil.escape(layout.getGroup().getDisplayURL(themeDisplay, false)) />
76 <#assign url =
77 "${site_default_url}/w/${friendlyUrlSeccion}/-/categories/${categoryArticulo.categoryId}?boletin=${welboaBoletin.articleId}"
78 />
79 <div class="text-center pt-3 pb-4 col-12 asisomos_cta d-flex justify-content-center">
80 <a class="btn-once btn-link boton_cta btn_color_black" role="button" href="${url}">
81 <@liferay.language key='view-more'/> ${welboaService.recuperarCampo(seccion, "nombre")}
82 </a>
83 </div>
84 <#assign index = index + 1 />
85 </#list>
86 </#if>
87 </#if>
88</#if>