Blogs

Se ha producido un error al procesar la plantilla.
The following has evaluated to null or missing:
==> categories[0]  [in template "10136#10174#30064301" at line 81, column 23]

----
Tip: It's the final [] step that caused this error, not those before it.
----
Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----

----
FTL stack trace ("~" means nesting-related):
	- Failed at: ${categories[0].getName()}  [in template "10136#10174#30064301" in macro "card" at line 81, column 21]
	- Reached through: @card entry=entry col=6 index=entry?i...  [in template "10136#10174#30064301" at line 25, column 13]
----
1<#assign PortalUtil = staticUtil["com.liferay.portal.kernel.util.PortalUtil"] /> 
2<#assign completeUrl = PortalUtil.getCurrentCompleteURL(request)!"" /> 
3 
4<#assign url = "" /> 
5<#if completeUrl != "" > 
6    <#assign url = completeUrl?split("/-/")[0] /> 
7</#if> 
8 
9<#list entries as entry> 
10 
11    <#if entry?index == 0> 
12        <div class="row bitacoras"> 
13    </#if> 
14 
15    <#assign viewURL = url + "/-/blogs/" + entry.getUrlTitle() /> 
16 
17    <#assign summary = entry.getDescription() /> 
18 
19    <#if validator.isNull(summary)> 
20        <#assign summary = entry.getContent() /> 
21    </#if> 
22 
23    <#if entry?index gte 0 && entry?index lte 6> 
24        <#if entry?index == 0 || entry?index == 5> 
25            <@card entry=entry col=6 index=entry?index /> 
26        <#else> 
27            <@card entry=entry col=3 index=entry?index/> 
28        </#if> 
29    </#if> 
30 
31    <#if entry?index == 6> 
32        </div> 
33    </#if> 
34 
35</#list> 
36 
37<#macro card entry col index> 
38    <#assign imageClass = "" /> 
39    <#assign hover = "" /> 
40    <#assign indexClass = "" /> 
41    <#assign mdClass = "" /> 
42    <#assign xsClass = "col-xs-12" /> 
43    <#assign xlClass = "" /> 
44    <#assign lgClass = "" /> 
45    <#assign marginClass = "" /> 
46    <#if col == 6> 
47        <#assign imageClass = "cover"/> 
48        <#assign hover = "hover"/> 
49        <#assign mdClass = "col-md-8"/> 
50        <#assign lgClass = "col-lg-6"/> 
51        <#assign xlClass = "col-xl-6"/> 
52    <#else> 
53        <#assign mdClass = "col-md-3"/> 
54        <#assign xlClass = "col-xl-3"/> 
55        <#assign lgClass = "col-lg-3"/> 
56    </#if> 
57    <#if index == 1> 
58        <#assign marginClass = "noMarginMobile"/> 
59    </#if> 
60    <#if index == 2> 
61        <#assign marginClass = "noMargin"/> 
62    </#if> 
63    <#if index == 2 || index == 3 || index == 4> 
64        <#assign mdClass = "col-md-3"/> 
65    </#if> 
66    <#if index == 3 || index == 4> 
67        <#assign indexClass = "marginRight"/> 
68    </#if> 
69    <div id="entry-${index}" class="col-xs-${col} ${indexClass} ${mdClass} ${xsClass} ${xlClass} ${lgClass} bitacora ${marginClass}"> 
70        <article class="blog-entry col-xs-12 ${marginClass}"> 
71            <#if entry.getSmallImage()> 
72                <img src="${entry.getSmallImageURL(themeDisplay)}" alt="${htmlUtil.escape(entry.getTitle())}" class="${imageClass}"/> 
73            </#if> 
74 
75            <div class="row ${hover}"> 
76 
77                <div class="col-xs-12 categories"> 
78                    <#assign blogsEntryClassName = "com.liferay.blogs.model.BlogsEntry" /> 
79                    <#assign assetCategoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService")/> 
80                    <#assign categories = assetCategoryLocalService.getCategories("com.liferay.blogs.model.BlogsEntry", entry.getEntryId())/> 
81                    ${categories[0].getName()} 
82                </div> 
83                <div class="col-xs-12 unav-bitacora-title"> 
84                    <a href="${viewURL}"><span>${htmlUtil.escape(entry.getTitle())}</span></a> 
85                </div> 
86            </div> 
87 
88        </article> 
89    </div> 
90</#macro> 
91<style> 
92    body #wrapper{ 
93        background-color: #f9f9f9; 
94
95    .row.bitacoras{ 
96        background-color: #f9f9f9; 
97
98    #entry-6{ 
99        display: none; 
100
101    @media (max-width: 820px){ 
102        #entry-6{ 
103            display: block; 
104
105
106    @media (max-width: 991px) and (min-width: 768px){ 
107        .col-md-3 { 
108            flex: 0 0 33.33333%; 
109            max-width: 33.33333%; 
110
111
112</style> 

Mostrando el intervalo 1 - 10 de 25 resultados.