Project coordination
An error occurred while processing the template.
The following has evaluated to null or missing: ==> coverImage.getAttribute("alt") [in template "20116#20152#30971" at line 92, column 90] ---- Tip: If the failing expression is known to be 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: ${coverImage.getAttribute("alt")} [in template "20116#20152#30971" at line 92, column 88] ----
1<#assign
2 author = request.attributes.author!""
3 displayMode = getterUtil.getInteger(request.attributes.displayMode!0,0)
4 viewURL = request.attributes.viewURL!""
5 randId = ""
6/>
7<!-- Function that returns random number used to have unique id -->
8<#function randomNumber str >
9<#local l = str?length />
10<#local r = ""/>
11<#list 1..l as i>
12<#local r = r+str?substring(l-i,l-i+1)/>
13</#list>
14<#return r/>
15</#function>
16
17<#if displayMode == 1 >
18 <#assign
19 aspectRatio = request.attributes.aspectRatio!""
20 pullTo = ((request.attributes.pullTo!"") == "right")?then("pull-sm-right", "")
21 />
22 <div class="blog-list-card col-sm-6 ${pullTo}">
23 <div class="asset-abstract">
24 <div class="aspect-ratio ${aspectRatio} aspect-ratio-bg-center aspect-ratio-bg-cover" style="background-image: url('${(coverImage.getData()?? && coverImage.getData() != "")?then(coverImage.getData(), '')}')">
25 <div class="blog-list-card-content container-fluid">
26 <h2 class="asset-title">
27 <a href="${viewURL}">
28 </a>
29 </h2>
30
31 <div class="asset-content">
32 <span class="asset-user-name">
33 <@liferay.language key="by" />
34
35 ${author}
36 </span>
37 </div>
38 </div>
39 </div>
40 </div>
41 </div>
42<#elseif displayMode == 2 >
43 <#assign colMd = request.attributes.colMd!"">
44 <div id="asset-abstract-${title.getData()}" class="asset-abstract ${colMd}">
45
46 <#if coverImage.getData()?? && coverImage.getData() != "">
47 <a class="aspect-ratio aspect-ratio-16-to-9 aspect-ratio-bg-center aspect-ratio-bg-cover" href="${viewURL}" style="border-top: 3px solid white;border-left: 3px solid white;border-right: 3px solid white; background-image: url('${(coverImage.getData()?? && coverImage.getData() != "")?then(coverImage.getData(), '')}')">
48 </a>
49 </#if>
50
51 <div id="list-content" class="blog-list-card-content">
52 <h2 class="asset-title">
53 <a href="${viewURL}">
54 ${title.getData()}
55 </a>
56 </h2>
57 <h3>
58 ${subTitle.getData()}
59 </h3>
60
61 <!-- <div class="asset-user-name">
62 <@liferay.language key="by" />
63 ${author}
64 </div> -->
65
66 <div id="content-div" class="asset-content">
67 <div class="asset-summary orange-link">
68 ${content.getData()}
69
70 <#assign randomIdReadMore ="${randomNumber(.now?long?string)}"?number />
71 <#if randomIdReadMore?? && randomIdReadMore?string != "">
72 <#assign randId="read-more-${randomIdReadMore}" />
73 <#else>
74 <#assign randId="read-more" />
75 </#if>
76 <div id="${randId}" style="display:none" >
77 <p class="read-more"><a href="${viewURL}" class="read-more-button"><@liferay.language key="read-more" /></a></p>
78 <!-- <a href="${viewURL}"> <button class="read-more">weiterlesen</button></a>-->
79
80 </div>
81
82 <a class="sr-only" href="${viewURL}"><@liferay.language key="read-more" /><span class="hide-accessible"><@liferay.language key="about" />${title.getData()}</span> »</a>
83 </div>
84 </div>
85 </div>
86 </div>
87
88
89<#elseif displayMode == 3 >
90<div id="carouselDiv" class="aspect-ratio aspect-ratio-16-to-9 aspect-ratio-21-to-9 aspect-ratio-bg-center aspect-ratio-bg-cover" style="background-position:top !important; padding-bottom: 40% !important; background-image: url('${(coverImage.getData()?? && coverImage.getData() != '')?then(coverImage.getData(), '')}')" >
91 </div>
92<!-- add this inside the div tag above to have a tooltip with image description title="${coverImage.getAttribute("alt")}" -->
93<!-- This is the caption on the top of the image
94 <div id="description" class="description">
95 <p class="description_content">${coverImage.getAttribute("alt")}</p>
96 </div>-->
97
98 <div class="carousel-caption">
99 <h4>
100 <!--This is the caption in the lower part of the image -->
101 ${coverImage.getAttribute("alt")}
102 <!--<a href="${viewURL}">${title.getData()}</a> -->
103 </h4>
104
105 <div class="asset-user-name">
106 <!--<@liferay.language key="by" /> -->
107
108 <!--${author} -->
109 </div>
110
111 <small class="sr-only">
112 <!--${subTitle.getData()} -->
113 </small>
114 </div>
115<#else>
116
117 <div class="asset-entry-detail">
118 <#if coverImage.getData()?? && coverImage.getData() != "">
119 <div class="aspect-ratio aspect-ratio-16-to-9 aspect-ratio-21-to-9 aspect-ratio-bg-center aspect-ratio-bg-cover" style="background-image: url('${(coverImage.getData()?? && coverImage.getData() != '')?then(coverImage.getData(), '')}')">
120 </div>
121 </#if>
122 <div class="container-fluid-1280">
123 <h1 class="text-center">${title.getData()}</h1>
124
125 <h2 class="text-center">${subTitle.getData()}</h2>
126
127 <br/>
128
129 <div class="asset-entry-container orange-link col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
130 ${content.getData()}
131 </div>
132 </div>
133 </div>
134</#if>
135
136<script>
137/*Check if there is overflow and display read more link*/
138function getOverflow(myElem) {
139var scroll = myElem.scrollHeight;
140var client = myElem.clientHeight;
141var rand = "${randId}";
142if(rand != ""){
143if (myElem.scrollHeight > myElem.clientHeight){
144 document.getElementById(rand).style.display = "block";
145 }
146 }
147};
148/*Launch the function with a fake onclik on the component*/
149var el = document.getElementById("asset-abstract-${title.getData()}");
150if ('null' != el && el != null){
151el.onclick = getOverflow(el);
152}
153</script>
154<!--<style>
155.description{
156 position:absolute; /* absolute position (so we can position it where we want)*/
157 top: 8px;
158 left: 16px;
159 width:100%;
160 /* styling bellow */
161 background-color:black;
162 color:white;
163 opacity:0.6; /* transparency */
164 filter:alpha(opacity=60); /* IE transparency */
165}
166.description_content{
167 text-align:center;
168 padding:10px;
169 margin:0px;
170 font-size: 20px;
171}
172</style>-->