Data
Dal
Al
null ANIA TRENDS INFORTUNI E MALATTIA - DATI AL 30 GIUGNO 2021
Si è verificato un errore nell'elaborarazione del modello.
The following has evaluated to null or missing:
==> podcast  [in template "20099#20135#53519" at line 15, column 24]

----
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: ${podcast.getData()}  [in template "20099#20135#53519" at line 15, column 22]
----
1<#assign fileEntry = serviceLocator.findService( 
2"com.liferay.document.library.kernel.service.DLFileEntryLocalService") /> 
3<#assign imagePathTheme = themeDisplay.getPathThemeImages() /> 
4 
5<div class="pubblicazione" id="pubblicazione${randomNamespace}"> 
6    <div class="top-part row"> 
7        <div  
8            class="image"  
9            style="background-image:url('${imagePathTheme}/vendor/background/ANIA-podcast-4.jpg')" 
10
11        </div> 
12    </div> 
13 
14    <audio class="audio" id="audio${randomNamespace}"> 
15        <source src="${podcast.getData()}" /> 
16    </audio> 
17     
18    <div class="main-part row"> 
19        <div class="ania-wrapper pubblicazione-content"> 
20            <#if titolo.getData()!=""> 
21                <div class="title"> 
22                    <h3 class="section-title">${titolo.getData()}</h3> 
23                     <#assign documentArray = documento.getData()?split("/")/> 
24                    <#assign uuid = documentArray[5]?keep_before("?")/> 
25 
26                    <#assign file = fileEntry.getFileEntryByUuidAndGroupId(uuid, groupId) /> 
27 
28                    <#assign docType = file.getExtension()?trim /> 
29 
30                    <#if docType != "pdf" && 
31                        docType != "xls" && 
32                        docType != "xlsx" && 
33                        docType != "zip" && 
34                        docType != "rar" && 
35                        docType != "7z" 
36
37                        <#assign docType = "generic_file" /> 
38                    </#if> 
39 
40                    <a 
41                        class="btn btn-primary card-icon download-button" 
42                        href="${documento.getData()}" 
43                        target="blank" 
44
45                        Apri 
46                        <#if docType != "generic_file"> 
47                            <img 
48                                alt="${docType}" 
49                                class="media-type-icon " 
50                                src="${imagePathTheme}/vendor/files/${docType}.svg" 
51                                width="20" 
52                            /> 
53                        </#if> 
54                    </a> 
55                </div> 
56            </#if> 
57            <#if testo.getData()!=""> 
58                <p class="bottom-summary"> 
59                    ${testo.getData()} 
60                </p> 
61            </#if> 
62 
63            <div class="player"> 
64                <div class="audio-title"><span>Ascolta e scarica il podcast</span></div> 
65                <img  
66                    class="audio-button open-modal-audio"  
67                    data-media-url="${podcast.getData()?trim}"  
68                    src="/o/ania-theme/images/play.png"  
69                    alt="play" 
70                /> 
71                <a href="${podcast.getData()?html}"> 
72                    <img class="audio-button audio-download" src="/o/ania-theme/images/download.png"/> 
73                </a> 
74            </div> 
75            <p class="duration"> 
76            </p> 
77        </div> 
78    </div> 
79</div> 
80<div id="overlay"> 
81    <div class="close"></div> 
82    <div class="overlay-content"></div> 
83</div> 
84 
85<script> 
86    ;(function() { 
87 
88        var $openModalAudioButtons = $("#pubblicazione${randomNamespace} .open-modal-audio"); 
89 
90        $openModalAudioButtons.each(function() { 
91            var $button = $(this); 
92            var audioUrl = $button.data("media-url"); 
93            $button.click(function(e) { 
94                e.preventDefault(); 
95                openModalAudio(audioUrl); 
96            }); 
97        }); 
98 
99        $(document).ready(function(){ 
100            var audioElement = $("#audio${randomNamespace}") 
101            audioElement.on("canplay",function(){ 
102                var duration = document.getElementById("audio${randomNamespace}").duration; 
103                var minutes = Math.floor(duration / 60); 
104                var seconds = duration - minutes * 60; 
105                seconds= parseInt(seconds, 10) 
106                $(".duration").html(minutes+":"+seconds); 
107            }); 
108            var audioElementHtml = document.getElementById("audio${randomNamespace}"); 
109            if (audioElementHtml.readyState > 3) { 
110                var duration = audioElementHtml.duration; 
111                var minutes = Math.floor(duration / 60); 
112                var seconds = duration - minutes * 60; 
113                seconds= parseInt(seconds, 10) 
114                $(".duration").html(minutes+":"+seconds); 
115
116        }); 
117 
118        function openModalAudio(audioId) { 
119            var audioHtml = '<audio controls autoplay><source src=' + audioId.toString() + '></audio>'; 
120            var overlay = $('#overlay .overlay-content'); 
121 
122            var overlayParent = $('#overlay'); 
123            var overlay = overlayParent.find('.overlay-content'); 
124 
125            overlay.append(audioHtml); 
126 
127            overlayParent.addClass('show'); 
128 
129            var btnClose = $('#overlay .close'); 
130                btnClose.click(function() { 
131                overlayParent.removeClass('show'); 
132                overlay.empty(); 
133            }); 
134
135    })(); 
136</script>