Course
Building Enterprise Websites with Liferay TEST
2 hours
Developer, Administrator, Practitioner
Beginner
S'ha produït un error mentre es processava la plantilla.
The following has evaluated to null or missing: ==> navigationJSONObject.getJSONObject("course") [in template "17855804202317#32484267#LEARN-COURSE-SIDE-NAV" at line 5, column 28] ---- 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: courseJSONObject = navigationJSONObje... [in template "17855804202317#32484267#LEARN-COURSE-SIDE-NAV" at line 5, column 9] ----
1<#assign
2 groupPathFriendlyURLPublic = themeDisplay.getPathFriendlyURLPublic() + themeDisplay.getScopeGroup().getFriendlyURL()
3 navigationJSONObject = jsonFactoryUtil.createJSONObject(navigation.getData())
4
5 courseJSONObject = navigationJSONObject.getJSONObject("course")
6 modulesJSONArray = navigationJSONObject.getJSONArray("modules")
7/>
8
9<div class="learn-course-side-nav">
10 <div class="learn-course-nav-content">
11 <#if modulesJSONArray.length() gt 0>
12 <ul class="m-0 p-2">
13 <li class="learn-course-nav-item ${(navigationJSONObject.getJSONObject("self").url == courseJSONObject.url)?then("selected", "")}">
14 <a class="liferay-nav-item" href="${courseJSONObject.url}">
15 <span>Introduction</span>
16 </a>
17 </li>
18
19 <#list 0..modulesJSONArray.length()-1 as i>
20 <div>
21 <#assign
22 modulesJSONObject = modulesJSONArray.getJSONObject(i)
23
24 lessonsJSONArray = modulesJSONObject.getJSONArray("lessons")?eval_json
25 moduleLessonIsSelected = false
26 />
27
28 <#list lessonsJSONArray as lesson>
29 <#if navigationJSONObject.getJSONObject("self").url == lesson.url>
30 <#assign moduleLessonIsSelected = true />
31 </#if>
32 </#list>
33 <div class="panel-group">
34 <div class="panel panel-secondary">
35 <button
36 aria-controls= "collapsePanel${i}"
37 aria-expanded="false"
38 class="btn btn-unstyled panel-header panel-header-link collapse-icon collapse-icon-middle collapsed"
39 data-target= "#collapsePanel${i}"
40 data-toggle="liferay-collapse"
41 onclick="togglePanel(this)"
42 >
43 <span class="panel-title">
44 <li class="learn-course-nav-item">
45 <div
46 class="liferay-nav-item ${(moduleLessonIsSelected)?then("highlightedNavItem", "")} ${(navigationJSONObject.getJSONObject("self").url == modulesJSONObject.url)?then("selected", "")}"
47 href="${modulesJSONObject.url}"
48 style="display: flex; justify-content: space-between;"
49 >
50 <div class="nav-item-number-title">
51 <div>
52 <span class="course-module-number ${(moduleLessonIsSelected)?then("highlighted", "")}">${i+1}</span>
53 </div>
54
55 <span class="course-module-title">${modulesJSONObject.getString("title")}</span>
56 </div>
57 </div>
58
59 <span class="collapse-icon-closed">
60 <svg
61 class="lexicon-icon lexicon-icon-angle-right"
62 role="presentation"
63 >
64 <use xlink:href="/o/admin-theme/images/clay/icons.svg#angle-right" />
65 </svg>
66 </span>
67 <span class="collapse-icon-open">
68 <svg
69 class="lexicon-icon lexicon-icon-angle-down"
70 role="presentation"
71 >
72 <use xlink:href="/o/admin-theme/images/clay/icons.svg#angle-down" />
73 </svg>
74 </span>
75 </li>
76 </span>
77 </button>
78
79 <div class="panel-collapse collapse ${(moduleLessonIsSelected)?then("show", "")}" id="collapsePanel${i}">
80 <div class="panel-body">
81 <#list lessonsJSONArray as lesson>
82 <div class="container-lesson ${(navigationJSONObject.getJSONObject("self").url == lesson.url)?then("selected", "")}">
83 <div class="course-module-transparent" />
84
85 <a href="${lesson.url}">${lesson.title}</a>
86 </div>
87 </#list>
88 </div>
89 </div>
90 </div>
91 </div>
92 </div>
93 </#list>
94 </ul>
95 </#if>
96 </div>
97</div>
98
99<script>
100 function togglePanel(button) {
101 button.setAttribute('aria-expanded', button.getAttribute('aria-expanded') === 'true' ? 'false' : 'true');
102
103 const courseModuleNumber = button.querySelector('.course-module-number');
104
105 courseModuleNumber.classList.toggle('highlighted');
106
107 const liferayNavItem = button.querySelector('.liferay-nav-item');
108
109 liferayNavItem.classList.toggle('highlightedNavItem');
110 }
111</script>
Congratulations! You've Completed the Course
You've successfully finished the "Building Enterprise Websites with Liferay TEST" course! We're proud of your dedication and hard work.
S'ha produït un error mentre es processava la plantilla.
The following has evaluated to null or missing: ==> navigationJSONObject.getJSONArray("modules") [in template "17855804202317#32484267#LEARN-COURSE-INTRO-CONGRATS-BOTTOM-NAV" at line 7, column 23] ---- 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: firstModule = navigationJSONObject.ge... [in template "17855804202317#32484267#LEARN-COURSE-INTRO-CONGRATS-BOTTOM-NAV" at line 7, column 9] ----
1<#assign
2 currentURL = themeDisplay.getURLCurrent()
3 groupPathFriendlyURLPublic = themeDisplay.getPathFriendlyURLPublic() + themeDisplay.getScopeGroup().getFriendlyURL()
4 hrefLink = ""
5 navigationJSONObject = jsonFactoryUtil.createJSONObject(navigation.getData())
6
7 firstModule = navigationJSONObject.getJSONArray("modules").getJSONObject(0)
8/>
9
10<#if currentURL?contains("congratulations")>
11 <#assign hrefLink = "/education/courses/index" />
12<#else>
13 <#assign hrefLink = firstModule.url?html />
14</#if>
15
16<ul class="m-0 p-2">
17 <li class="course-bottom-nav-item">
18 <a class="d-flex justify-content-between" ${(navigationJSONObject.getJSONObject("self").url == firstModule.url)?then("selected", "")} href="${hrefLink}">
19 <#if currentURL?contains("congratulations")>
20 <div>
21 <span>View All Available Courses</span>
22 </div>
23 <#else>
24 <div>
25 <span class="course-bottom-nav-cta">Start the Course!</span>
26 <span>${firstModule.getString("title")}</span>
27 </div>
28 </#if>
29
30 <svg fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
31 <mask height="10" id="right_arrow" maskUnits="userSpaceOnUse" style="mask-type:alpha" width="19" x="2" y="7">
32 <path d="M16.8645 16.4842L20.2207 13.1279C20.727 12.5701 20.7457 11.5858 20.2207 10.9811L16.8645 7.62482C15.2895 6.22795 13.3535 8.36545 14.7176 9.7717L15.5004 10.5545H4.11914C2.12695 10.5545 2.12695 13.5545 4.11914 13.5545H15.5004L14.7176 14.3373C13.316 15.8279 15.416 17.8764 16.8645 16.4842Z" fill="#6B6C7E" />
33 </mask>
34
35 <g mask="url(#right_arrow)">
36 <rect fill="white" height="24" width="24" />
37 </g>
38 </svg>
39 </a>
40 </li>
41</ul>
Capabilities
Product
Contact Us
Powered by Liferay
© 2024 Liferay Inc. All Rights Reserved • Privacy Policy