An error occurred while processing the template.
The following has evaluated to null or missing:
==> formField.getValue().getString(locale)  [in template "20101#20128#SLIDER-HERO" at line 153, column 45]

----
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: #assign Bildnachweis = formField.getV...  [in template "20101#20128#SLIDER-HERO" in function "getCopyright" at line 153, column 21]
	- Reached through: ${getCopyright(curSlide.Image)}  [in template "20101#20128#SLIDER-HERO" at line 25, column 63]
----
1<#assign layoutService = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService") /> 
2<#assign namespace = randomNamespace /> 
3<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")> 
4 
5 
6<section class="slider-hero" id="slider_${namespace}"> 
7    <div class="slides-list"> 
8 
9        <#list Slide.getSiblings() as curSlide> 
10 
11            <#assign hasLink = false /> 
12            <#assign linkTarget = "" /> 
13            <#assign linkHref= "" /> 
14            <#assign linkText = "weiterlesen" /> 
15            <#assign linkTitle = "Artikel weiterlesen" /> 
16 
17            <div class="slide"> 
18                <div class="slide-content"> 
19                    <div class="slide-content-image"> 
20                        <img src="${curSlide.Image.getData()}" data-src="${curSlide.Image.getData()}" 
21                             class="slide__image" alt="${getAltText(curSlide.Image)}" 
22                             role="img"/> 
23                    </div> 
24                </div> 
25                <div class="bildnachweis">Bildnachweis: &#169;${getCopyright(curSlide.Image)}</div> 
26            </div> 
27        </#list> 
28    </div> 
29</section> 
30 
31<@liferay_aui.script use="aui-node"> 
32    var ${namespace}slider; 
33 
34    var ${namespace}_initializeSlider = function () { 
35 
36        function ${namespace}_updateInfo(info) { 
37            if (info.navItems) { 
38                for (var i = 0; i < info.navItems.length; i++) { 
39                    info.navItems[i].setAttribute('aria-label', 'Folie ' + (i + 1)); 
40                    info.navItems[info.navCurrentIndex].setAttribute('tabindex', '-1'); 
41
42 
43                info.navItems[info.navCurrentIndex].setAttribute('aria-label', 'Folie ' + (info.navCurrentIndex + 1) + ' (aktuell)'); 
44                info.navItems[info.navCurrentIndex].setAttribute('tabindex', '-1'); 
45 
46
47 
48            info.controlsContainer.setAttribute('aria-label', 'Navigationselemente'); 
49            info.controlsContainer.setAttribute('tabindex', '-1'); 
50            info.prevButton.setAttribute('aria-label', 'zur vorhergehenden Folie springen'); 
51            info.prevButton.setAttribute('tabindex', '0'); 
52            info.nextButton.setAttribute('aria-label', 'zur nächsten Folie springen'); 
53            info.nextButton.setAttribute('tabindex', '0'); 
54 
55            if (info.navContainer) { 
56                info.navContainer.setAttribute('aria-label', 'Auswahl der Folien') 
57
58
59 
60        ${namespace}slider = tns({ 
61            container: '#slider_${namespace} .slides-list', 
62            items: 1, 
63            slideBy: 'page', 
64            center: true, 
65            //controls: false, 
66            controlsPosition: 'bottom', 
67            navPosition: 'bottom', 
68            touch: true, 
69            mouseDrag: true, 
70            freezable: true, 
71            speed: 600, 
72            lazyload: true, 
73            autoPlay: true, 
74            lazyloadSelector: '.slide__image', 
75            controlsText: ['<span class="icon-nn icon-nn--arrow-left" role="img"></span>', '<span class="icon-nn icon-nn--arrow-right" role="img"></span>'], 
76            onInit: function(info) { 
77                ${namespace}_updateInfo(info); 
78
79        }) 
80    }; 
81 
82    ${namespace}_initializeSlider(); 
83 
84</@liferay_aui.script> 
85 
86<#function getAltText ddmImage> 
87    <#assign 
88    altText = ddmImage.getAttribute("alt") 
89    /> 
90    <#if altText?has_content && (altText !="default")> 
91        <#return altText /> 
92    <#else> 
93        <#assign 
94        imageUrl = ddmImage.getData() 
95        imageFileUid = stringUtil.extractLast(imageUrl, "/") 
96        /> 
97        <#if (stringUtil.extractFirst(imageFileUid, "t")??)> 
98            <#assign imageFileUid = stringUtil.extractFirst(imageFileUid, "t")/> 
99            <#assign imageFileUid = imageFileUid?substring(0,imageFileUid?length-1)/> 
100        </#if> 
101        <#assign 
102        dlFileEntryLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService") 
103        fileEntry = dlFileEntryLocalService.getFileEntryByUuidAndGroupId(imageFileUid, groupId) 
104        fileEntryTypeId = fileEntry.getFileEntryTypeId() 
105        /> 
106        <#if fileEntryTypeId gt 0> 
107            <#assign 
108            dlFileEntryTypeLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryTypeLocalService") 
109            dlFileVersionLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileVersionLocalService") 
110            dlFileVersion = dlFileVersionLocalService.getLatestFileVersion(fileEntry.getUserId(), fileEntry.getFileEntryId()) 
111            fieldsMap = fileEntry.getDDMFormValuesMap(dlFileVersion.getFileVersionId()) 
112            /> 
113            <#list fieldsMap?keys as ddmFormKey> 
114                <#assign ddmForm = fieldsMap[ddmFormKey]/> 
115                <#list ddmForm.getDDMFormFieldValues() as formField> 
116                    <#if formField.getName() == 'AltTag'> 
117                        <#assign altTag = formField.getValue().getString(locale) /> 
118                        <#return altTag /> 
119                    </#if> 
120                </#list> 
121            </#list> 
122        </#if> 
123    </#if> 
124    <#return altText /> 
125</#function> 
126 
127<#function getCopyright ddmImage> 
128    <#assign 
129    Bildnachweis = "" 
130    imageUrl = ddmImage.getData() 
131    imageFileUid = stringUtil.extractLast(imageUrl, "/") 
132    /> 
133    <#if (stringUtil.extractFirst(imageFileUid, "t")??)> 
134        <#assign imageFileUid = stringUtil.extractFirst(imageFileUid, "t")/> 
135        <#assign imageFileUid = imageFileUid?substring(0,imageFileUid?length-1)/> 
136    </#if> 
137    <#assign 
138    dlFileEntryLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService") 
139    fileEntry = dlFileEntryLocalService.getFileEntryByUuidAndGroupId(imageFileUid, groupId) 
140    fileEntryTypeId = fileEntry.getFileEntryTypeId() 
141    /> 
142    <#if fileEntryTypeId gt 0> 
143        <#assign 
144        dlFileEntryTypeLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryTypeLocalService") 
145        dlFileVersionLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileVersionLocalService") 
146        dlFileVersion = dlFileVersionLocalService.getLatestFileVersion(fileEntry.getUserId(), fileEntry.getFileEntryId()) 
147        fieldsMap = fileEntry.getDDMFormValuesMap(dlFileVersion.getFileVersionId()) 
148        /> 
149        <#list fieldsMap?keys as ddmFormKey> 
150            <#assign ddmForm = fieldsMap[ddmFormKey]/> 
151            <#list ddmForm.getDDMFormFieldValues() as formField> 
152                <#if formField.getName() == 'Bildnachweis'> 
153                    <#assign Bildnachweis = formField.getValue().getString(locale) /> 
154                    <#return Bildnachweis /> 
155                </#if> 
156            </#list> 
157        </#list> 
158    </#if> 
159    <#return Bildnachweis/> 
160</#function> 

 

Das Netzwerk für nachhaltiges Handeln in Baden-Württemberg

Das N!-Netzwerk macht nachhaltiges Engagement in Baden-Württemberg sichtbar.
Hier finden Sie eine Vielzahl toller Ideen, Aktionen und Veranstaltungen. Lassen Sie sich inspirieren.

Haben Sie selbst eine nachhaltige Aktion, dann tragen Sie diese ins N!-Netzwerk ein.

Hier Aktion eintragen

Machen Sie aus Ihrer Veranstaltung ein Green Event BW!​​​​​​​

Wenn wir Ihnen beim Eintragen Ihrer Aktion(en) helfen sollen, melden Sie sich gerne (0711 92579 68). ​​​​​​​

 

Neue Aktionen

So einfach geht's! Aktionen ins N!-Netzwerk eintragen

  • Als Akteur registrieren

  • Pfeil zum nächsten Texblock Pfeil zum nächsten Texblock
  • Akteursprofil ausfüllen

    und entscheiden,­ welche Informationen öffentlich­ gezeigt werden
  • Pfeil zum nächsten Texblock Pfeil zum nächsten Texblock
  • Aktion einstellen

    und auf Veröffentlichung warten

HeldeN!-Tat des Monats

#heldendertat