There was a problem with a Velocity script
Page/httpd/prestosports/site-public/WEB-INF/themes/generic/bio-career-template
ErrorInvocation of method 'getOverall' in class com.prestosports.content.sport.stats.StatsSplitter threw exception java.lang.NullPointerException at /httpd/prestosports/site-public/WEB-INF/themes/generic/bio-career-template[line 53, column 24]
Page source:
1: ## MOBILE CHECK
2: #if ($browser.getIphone() || $browser.getMobile())
3: 	#set ($isMobile = true)
4: #else
5: 	#set ($isMobile = false)
6: #end
7: 
8: #set ($mobileNS = 'mobile-stats-')
9: #set ($mobileNSP = "#${mobileNS}")
10: 
11: ## PICK UP OPTIONS
12: $website.include("options")
13: #set ($options = $request.getAttribute("options"))
14: #set ($locale = "en_us")
15: #set ($locale = $options.get("locale"))
16: #set ($showCareer = $wiki.valid() && $seasons)
17: #if ("yes" == $options.get("stats_show_career") && $seasons)
18:   #set ($showCareer = "yes")
19: #end
20: 
21: #if ($locale == "en_us")
22:   #set ($defLabel = "Defense")
23: #elseif ($locale == "en_gb")
24:   #set ($defLabel = "Defence")
25: #end
26: 
27: #set ($pos = "")
28: #if($attributes.get("position_stat"))
29:     #set ($pos = $attributes.get("position_stat"))
30: #else
31:     #set ($pos = $attributes.get("position"))
32:     #set ($pos = $statPosition)
33:     #set ($posVec = $pos.split("/"))
34:     #set ($pos = $posVec[0])
35: #end
36: #set ($pos = $pos.toLowerCase())
37: #set ($pos = $positions.get($pos))
38: 
39: #set ($highlights = $highlights.get($pos))
40: #if ($request.getParameter("pos"))
41:   #set ($pos = $request.getParameter("pos"))
42:   #set ($pos = $pos.toLowerCase())
43:   #set ($pos = $positions.get($pos))
44: #end
45: #set ($labels = $labels.get($pos))
46: #set ($briefs = $briefs.get($pos))
47: #set ($gamelogs = $gamelogs.get($pos))
48: #set ($view = $!request.getParameter("view"))
49: #set ($url = ${page.url})
50: 
51: #set ($playerId = $attributes.get("playerId"))
52: 
53: #set ($stats = $splits.overall)
54: 
55: ## CAREER STATS WILL PRINT LIKE THIS
56: #macro (splitBioCareer $label $stats $class)
57:     #set ($url = "${page.url}?view=career")
58:     #if ($request.getParameter("pos"))
59:       #set ($escPos = $request.getParameter("pos"))
60:       #set ($escPos = $tool.esc.url($escPos))
61:       #set ($url = "${url}&pos=$escPos")
62:     #end
63:     <tr class="$!{class}">
64:     <td class="${mobileNS}fixed-column"><a href="${url}">${label}</a></td>
65:     #foreach ($brief in $briefs.keySet())
66:       #set ($value = "-")
67:       #set ($value = $!formatter.formatNumber($stats.get($brief), $formats.get($brief)))
68:       <td align="center">
69:       #if ($value.length() > 0)$value#else - #end
70:       </td>
71:     #end
72:   </tr>
73: #end
74: 
75: #set ($name = $request.getParameter("name"))
76: $request.getAttribute("careerTotals").addGames($events)
77: $!request.getAttribute("careerMap").put($name, $stats)
78: 
79: #if ($request.getParameter("print") == 'yes')
80:   #splitBioCareer($name, $splits.overall, '')
81: #end

There was a problem with a Velocity script
Page/httpd/prestosports/site-public/WEB-INF/themes/generic/bio-template
ErrorInvocation of method 'getOverall' in class com.prestosports.content.sport.stats.StatsSplitter threw exception java.lang.NullPointerException at /httpd/prestosports/site-public/WEB-INF/themes/generic/bio-template[line 53, column 24]
Page source:
1: $website.addCss($website.cdn("/info/photo-gallery.css"))
2: <script src="${website.cdn("/info/klass.min.js")}"></script>
3: <script src="${website.cdn("/info/code.photoswipe.jquery-3.0.5.min.js")}"></script>
4: <script src="${website.cdn("/info/masonry.pkgd.min.js")}"></script>
5: <script src="${website.cdn("/info/imagesloaded.pkgd.min.js")}"></script>
6: <script src="${website.cdn("/info/photogallery/photogallery.js")}"></script>
7: 
8: ## PICK UP OPTIONS
9: $website.include("options")
10: #set ($options = $request.getAttribute("options"))
11: #set ($locale = "en_us")
12: #set ($locale = $options.get("locale"))
13: 
14: ## HACK TO GET STATS URL FROM RENDERER... NEEDS SERVER CHANGE
15: #set ($bioObject = $page.getDataAsObject())
16: #set ($statsURL = $bioObject.statsURL)
17: 
18: #if ($statsURL.length() > 0)
19:   $website.includeAgain("${statsURL}?tmpl=bio-stats-template")
20:   ## various settings to get the variables set
21:   #set ($events = $request.getAttribute("bio_events"))
22:   #set ($seasons = $request.getAttribute("bio_seasons"))
23:   #set ($career = $request.getAttribute("bio_career"))
24:   #set ($labels = $request.getAttribute("bio_labels"))
25:   #set ($briefs = $request.getAttribute("bio_briefs"))
26:   #set ($gamelogs = $request.getAttribute("bio_gamelogs"))
27:   #set ($splits = $request.getAttribute("bio_splits"))
28:   #set ($statPosition = $request.getAttribute("bio_position"))
29:   #set ($positions = $request.getAttribute("bio_positions"))
30:   #set ($playerId = $request.getAttribute("bio_player_id"))
31:   #set ($highlights = $request.getAttribute("bio_highlights"))
32:   #set ($formats = $request.getAttribute("bio_formats"))
33:   #set ($gamelogsCategoriesLabels = $request.getAttribute("bio_gamelogs_labels"))
34:   #set ($briefsCategoriesLabels = $request.getAttribute("bio_briefs_labels"))
35:   #set ($gamesResults = $request.getAttribute("bio_games_results"))
36:   #set ($monthsPlayed = $request.getAttribute("bio_months_played"))
37: #end
38: 
39: #set ($pos = "")
40: #if($attributes.get("position_stat"))
41:   #set ($pos = $attributes.get("position_stat"))
42: #else
43:   #set ($pos = $attributes.get("position"))
44:   #set ($pos = $statPosition)
45:   #set ($posVec = $pos.split("/"))
46:   #set ($pos = $posVec[0])
47: #end
48: #set ($pos = $pos.toLowerCase())
49: #set ($statPos = $positions.get($pos))
50: #set ($paramPos = $request.getParameter("pos"))
51: 
52: #set ($playerId = $attributes.get("playerId"))
53: #set ($stats = $splits.overall)
54: #set ($highlights = $highlights.get($statPos))
55: 
56: #set ($showHighlights = true)
57: #if ($options.get("bio_show_highlights") && $options.get("bio_show_highlights") == false)
58: 	#set ($showHighlights = false)
59: #end
60: 
61: #set ($enhancedLayout = false)
62: #if (($options.get("bio_enhanced_layout") == "yes") || ($request.getParameter("bio_enhanced_layout") == true))
63: 	#set ($enhancedLayout = true)
64: 	$website.addCss($website.cdn("/info/bio-styles-enhanced.css"))
65: #end
66: 
67: #set ($showActionShots = true)
68: #if ($options.get("bio_show_action_shots") && $options.get("bio_show_action_shots") == false)
69: 	#set ($showActionShots = false)
70: #end
71: 
72: #set ($actionShotsLimit = 5)
73: #set ($actionShotsLimit = $tool.math.toInteger($options.get("bio_action_shots_limit")))
74: 
75: #set ($showCareer = $wiki.valid() && $seasons)
76: #if ("yes" == $options.get("stats_show_career") && $seasons)
77:   #set ($showCareer = true)
78: #end
79: 
80: #set ($hasEvents = $events.size() > 0)
81: #set ($hasSynopsis = $synopsis.trim().length() > 0)
82: #set ($htmlStatsURL = "${page.url}-stats")
83: #set ($hasHTMLStats = $website.exists($htmlStatsURL))
84: #set ($bioBriefURL = "${page.url}-brief")
85: #set ($hasBioBrief = $website.exists("$bioBriefURL"))
86: #set ($showRoster = ($page.contentType == "loki/bio" && $page.headlinesFeatured.size() > 0) || ($page.contentType == "loki/bio-network" && $page.sectionPage.children.size() > 1))
87: #if ($options.get("bio_hide_roster") == true)
88:   #set ($showRoster = false)
89: #end
90: 
91: #set ($view = "")
92: #if ($hasSynopsis || $hasBioBrief)
93:   #set ($view = "bio")
94: #elseif ($statsURL.length() > 0)
95:   #set ($view = "profile")
96: #elseif ($hasHTMLStats)
97:   #set ($view = "htmlstats")
98: #elseif ($releases.size() > 0)
99:   #set ($view = "news")
100: #elseif ($playerPhotos.size() > 0)
101:   #set ($view = "photos")
102: #elseif ($playerVideos.size() > 0)
103:   #set ($view = "videos")
104: #end
105: 
106: #if ($options.get("bio_default_view").length() > 0)
107:   #set ($checkView = $options.get("bio_default_view"))
108: #end
109: 
110: #if ($request.getParameter("view"))
111:   #set ($checkView = $request.getParameter("view"))
112: #end
113: 
114: #if ($checkView == "profile" && $statsURL.length() > 0)
115:   #set ($view = "profile")
116: #elseif ($checkView == "bio" && ($hasSynopsis || $hasBioBrief))
117:   #set ($view = "bio")
118: #elseif ($checkView == "gamelog" && $statsURL.length() > 0)
119:   #set ($view = "gamelog")
120: #elseif ($checkView == "career" && $showCareer)
121:   #set ($view = "career")
122: #elseif ($checkView == "splits" && $statsURL.length() > 0)
123:   #set ($view = "splits")
124: #elseif ($checkView == "htmlstats" && $hasHTMLStats)
125:   #set ($view = "htmlstats")
126: #elseif ($checkView == "news" && $releases.size() > 0)
127:   #set ($view = "news")
128: #elseif ($checkView == "photos" && $playerPhotos.size() > 0)
129:   #set ($view = "photos")
130: #elseif ($checkView == "videos" && $playerVideos.size() > 0)
131:     #set ($view = "videos")
132: #end
133: 
134: #macro (printResultAriaLabel $event)
135:     #set ($ariaLabel = "${event.sport} event: ${formatter.formatDate($event.date, 'MMMM d hh:mm a:')}")
136:     #if ($event.neutralSite.length() > 0 || $event.home)
137:     	#set ($ariaLabel = "${ariaLabel} vs.")
138:     #else
139:     	#set ($ariaLabel = "${ariaLabel} at")
140:     #end
141:     #set ($ariaLabel = "${ariaLabel} ${event.opponent.name}:")
142:     #if ($event.neutralSite.length() > 0)
143:     	#set ($ariaLabel = "${ariaLabel} @ ${event.neutralSite}:")
144:     #end
145:     #set ($ariaLabel = "${ariaLabel} Box Score")
146:     aria-label="$ariaLabel"
147: #end
148: 
149: #macro (printGrid $items $type)
150: <div class="news-layout grid">
151:     <div class="stories">
152:         <ul>
153:         #foreach ($item in $items)
154:             #if ($item.title.length() > 0)
155: 
156:                 <li class="story ${type}">
157:                 	<div class="clearfix">
158:                 	<a href="$item.url" class="title-box">
159:                         <span class="thumb">
160:                         #if ($item.thumbnailURL)
161:                         	<img src="$website.cdn("/info/images/spacer.gif")" data-src="${item.thumbnailURL}?max_width=300" alt="" class="lazyload" />
162: 						#elseif ($item.contentType == "loki/youtube")
163: 							<img src="$website.cdn("/info/images/spacer.gif")" data-src="http://img.youtube.com/vi/${item.dataAsString}/0.jpg" alt="" class="lazyload" />
164:                         #else
165:                         	<img src="$website.cdn("/info/images/spacer.gif")" data-src="/images/setup/thumbnail_default.jpg?max_width=300" alt="" class="lazyload" />
166:                         #end
167:                         </span>
168:                 		<span class="title">$item.title</span>
169:                 	</a>
170:                 	</div>
171:                 </li>
172:             #end
173:         #end ## foreach
174:         </ul>
175:     </div>
176: </div>
177: #end ## ends macro
178: 
179: #macro (gamelogData $p)
180: 
181: #set ($p = $positions.get($p))
182: #set ($gamelogs = $gamelogs.get($p))
183: 
184: #if ($hasEvents)
185: <div class="stats-box full clearfix">
186: <div class="scrollable">
187: <div>
188: <table>
189:   <tr class="thead">
190:     <th class="text">Date</th>
191:     <th class="pinned-col text">Opponent</th>
192:     <th>Score</th>
193:     #foreach ($gamelog in $gamelogs)
194:       <th>$gamelog</th>
195:     #end
196:   </tr>
197: #foreach ($event in $events)
198:   <tr>
199:     <td class="text">$formatter.formatDate($event.event.date, "MMM d")</td>
200:     <td class="pinned-col text">
201:       #if ($event.event.neutralSite.length() > 0) vs. #elseif (!$event.event.home) at #end
202:       $event.event.opponent.name
203:     </td>
204:     <td>
205:     #if ($event.event.statusCode >= 0)
206:       #if ($event.event.eventId.length() > 0 && $event.stats.size() > 0)
207:           <a #printResultAriaLabel($event.event) href="../boxscores/${formatter.formatBoxScoreLink($event.event)}">${event.event.APResult}</a>
208:       #else
209:       ${event.event.APResult}
210:       #end
211:     #else &nbsp; #end
212:     </td>
213:     #foreach ($gamelog in $gamelogs.keySet())
214:       #set ($value = "-")
215:       #set ($value = $formatter.formatNumber($event.stats.get($gamelog), $formats.get($gamelog)))
216:       <td>$value</td>
217:     #end
218:   </tr>
219: #end
220: </table>
221: </div>
222: </div> ## scrollable
223: </div> ## stats-box
224: #end
225: 
226: #end ## macro gamelogData
227: 
228: #macro (split $statPosBriefs $label $stats)
229:   <tr>
230:     <td class="pinned-col text">${label}</td>
231: 
232:     #if($rosterTransactions && $view == "career")
233:         #set($keys =  $stats.names())
234:         #set($array = $keys.toString().replace('"','').split(","))
235:         #foreach ($brief in $statPosBriefs.keySet())
236:             #set ($value = "-")
237:             #if($array.contains($brief))
238:                 #set ($value = $!formatter.formatNumber($tool.math.toDouble($stats.get($brief)), $formats.get($brief)))
239:              #end
240:             <td>#if ($value.length() > 0) $value #else - #end</td>
241:         #end
242:     #else
243:         #foreach ($brief in $statPosBriefs.keySet())
244:           #set ($value = "-")
245:           #set ($value = $!formatter.formatNumber($stats.get($brief), $formats.get($brief)))
246:           <td>#if ($value.length() > 0) $value #else - #end</td>
247:         #end
248:     #end
249:   </tr>
250: #end
251: 
252: #macro (careerData $p)
253: #set ($p = $positions.get($p))
254: #set ($statPosBriefs = $briefs.get($p))
255: 
256: <div class="stats-box full clearfix">
257: <div class="scrollable">
258: <div>
259: <table>
260: <tr class="thead">
261:   <th class="pinned-col">&nbsp;</th>
262:   #foreach ($brief in $statPosBriefs)
263:     <th>$brief</th>
264:   #end
265: </tr>
266: 
267: #if($rosterTransactions)
268:     #set ($seasonLength = $career.seasons.length())
269:     #foreach ($index in [0..$tool.math.sub($seasonLength, 1)])
270:         #set($season = $career.seasons[$index])
271:         #if($season.seasonStatsURL != "null")
272:           #set ($label = "<a href='${season.seasonStatsURL}?view=profile'>$season.seasonName.replaceAll('^[^0-9-]*','') - $season.team.teamName</a>")
273:         #else
274:           #set ($label = "$season.seasonName.replaceAll('^[^0-9-]*','') - $season.team.teamName ")
275:         #end
276:         #split($statPosBriefs, $label, $season.player.stats)
277:     #end
278:     #split($statPosBriefs, "Total", $career.totals)
279: #else
280:     #set ($careerTotals = $request.getAttribute("careerTotals"))
281:     #set ($careerMap = $request.getAttribute("careerMap"))
282: 
283:     #foreach ($season in $seasons)
284:       ## Check if we did not get stats for this season
285:       #if ($careerMap.get($season.seasonName))
286:         #set ($label = "<a href='${season.path}?view=profile'>$season.seasonName</a>")
287:         #split($statPosBriefs, $label, $careerMap[$season.seasonName])
288:       #elseif ($wiki.valid())
289:         <tr>
290:           <td class="text">${season.seasonName}</td>
291:           <td colspan="${statPosBriefs.size()}">We could not find the "players" page in the ${season.seasonName} section.</td>
292:         </tr>
293:       #end
294:     #end
295: 
296:     #split($statPosBriefs, "Total", $request.getAttribute("careerTotals").overall)
297: #end
298: 
299: </table>
300: </div>
301: </div> ## scrollable
302: </div> ## stats-box
303: 
304: #end ## macro careerData
305: 
306: #macro (splitsData $p)
307: 
308: #set ($p = $positions.get($p))
309: #set ($statPosBriefs = $briefs.get($p))
310: #set ($colspan = $tool.math.add($statPosBriefs.size(), 1))
311: 
312: #if ($statPosBriefs.size() > 0)
313: <div class="stats-box full clearfix">
314: <div class="scrollable">
315: <div>
316: <table>
317:   <tr>
318:     <th class="pinned-col">&nbsp;</th>
319:     #foreach ($brief in $statPosBriefs)
320:       <th>$brief</th>
321:     #end
322:   </tr>
323: 
324: #split($statPosBriefs, "Total", $splits.overall)
325: #split($statPosBriefs, "Conference", $splits.conference)
326: #split($statPosBriefs, "Exhibition", $splits.exhibition)
327: 
328: <tr class="empty-row"><td colspan="$colspan"><div class="empty-cell">-</div></td></tr>
329: 
330: #split($statPosBriefs, "Home", $splits.home)
331: #split($statPosBriefs, "Away", $splits.away)
332: #split($statPosBriefs, "Neutral", $splits.neutral)
333: 
334: <tr class="empty-row"><td colspan="$colspan"><div class="empty-cell">-</div></td></tr>
335: 
336: #foreach($gameResult in $gamesResults.entrySet())
337:   #if ($gameResult.key == "wins")
338:     #set ($splitGameResult = $splits.inWins)
339:   #elseif ($gameResult.key == "losses")
340:     #set ($splitGameResult = $splits.inLosses)
341:   #elseif ($gameResult.key == "ties")
342:     #set ($splitGameResult = $splits.inTies)
343:   #end
344: 
345:   #split($statPosBriefs, $gameResult.value, $splitGameResult)
346: #end
347: 
348: <tr class="empty-row"><td colspan="$colspan"><div class="empty-cell">-</div></td></tr>
349: 
350: #if ($monthsPlayed and $monthsPlayed.size() > 0)
351:   #foreach($month in $monthsPlayed)
352:     #if ($month == 'January')
353:       #set ($splitMonth = $splits.january)
354:     #elseif ($month == 'February')
355:       #set ($splitMonth = $splits.february)
356:     #elseif ($month == 'March')
357:       #set($splitMonth = $splits.march)
358:     #elseif ($month == 'April')
359:       #set($splitMonth = $splits.april)
360:     #elseif ($month == 'May')
361:       #set ($splitMonth = $splits.may)
362:     #elseif ($month == 'June')
363:       #set ($splitMonth = $splits.june)
364:     #elseif ($month == 'July')
365:       #set($splitMonth = $splits.july)
366:     #elseif ($month == 'August')
367:       #set ($splitMonth = $splits.august)
368:     #elseif ($month == 'September')
369:       #set($splitMonth = $splits.september)
370:     #elseif ($month == 'October')
371:       #set($splitMonth = $splits.october)
372:     #elseif ($month == 'November')
373:       #set ($splitMonth = $splits.november)
374:     #elseif ($month == 'December')
375:       #set($splitMonth = $splits.december)
376:     #end
377: 
378:     #split($statPosBriefs, $month, $splitMonth)
379:   #end ## foreach
380: #end
381: </table>
382: </div>
383: </div> ## scrollable
384: </div> ## srollable-table
385: #end
386: 
387: #end ## macro splitsData
388: 
389: #macro (printRecentGames)
390: #if ($hasEvents)
391: <table>
392:   <tr class="thead accent-bg"><th colspan="3">Recent Games</th></tr>
393: 
394: #set ($eventEnd = -1)
395: #foreach ($event in $events)
396:   #if ($event.event.result.resolved)
397:     #set ($eventEnd = $velocityCount)
398:   #end
399: #end
400: 
401: #set ($eventStart = $eventEnd - 5)
402: #if ($eventStart < 0) #set ($eventStart = 0) #end
403: 
404: #foreach ($event in $events)
405: #if ($velocityCount >= $eventStart and $velocityCount <= $eventEnd)
406:   <tr>
407:     <td class="text">$formatter.formatDate($event.event.date, "MMM d")</td>
408:     <td class="text">
409:       #if ($event.event.neutralSite.length() > 0) vs.
410:       #elseif (!$event.event.home) at
411:       #else ## nothing for a home game
412:       #end
413:       $event.event.opponent.name
414:     </td>
415:     <td class="text">
416:     #if ($event.event.statusCode >= 0)
417:       #if ($event.event.eventId.length() > 0 && $event.stats.size() > 0)
418:           <a #printResultAriaLabel($event.event) href="../boxscores/${formatter.formatBoxScoreLink($event.event)}">${event.event.APResult}</a>
419:       #else
420:       ${event.event.APResult}
421:       #end
422: 	#end
423: 	</td>
424:   </tr>
425: #end ## if
426: #end
427: </table>
428: #end
429: #end ## macro printRecentGames
430: 
431: #macro (printCategories $briefCategoryLabels $v $ariaLabel)
432: 
433: <div class="tab-container secondary clearfix" data-module="stats/tabs" data-type="secondary">
434: <div class="tab-nav" data-module="jscroll" data-momentum="false">
435: <div>
436: <ul class="clearfix">
437: #foreach($briefCat in $briefCategoryLabels.entrySet())
438:   #set ($briefCatLabel = $briefCat.value)
439:   #set ($briefCatKey = $briefCat.key)
440: 
441:   #if ($locale == "en_gb" && $briefCatLabel == "Defense")
442:     #set ($briefCatLabel = "Defence")
443:   #end
444: 
445:   <li #if ($activePos == $briefCatKey) class="active" #end><a href="${page.url}?view=${v}&pos=${briefCatKey}" role="button" aria-label="${ariaLabel}: ${briefCatLabel}">$briefCatLabel</a></li>
446: #end
447: </ul>
448: </div>
449: </div>
450: <div class="tab-panels">
451: #foreach ($briefCat in $briefCategoryLabels.entrySet())
452:   #set ($class = "tab-panel clearfix")
453:   #if ($briefCat.key == $activePos)
454:     #set ($class = "tab-panel active clearfix")
455:   #end
456:   <div class="$class">
457:     <div class="stats-wrap clearfix">
458:     #if ($v == "splits")
459:       #splitsData($briefCat.key)
460:     #elseif ($v == "career")
461:       #careerData($briefCat.key)
462:     #end
463:     </div>
464:   </div>
465: #end
466: </div>
467: </div> ## tab-container
468: 
469: #end ## macro printCategories
470: 
471: #macro (printHeadshot)
472: #if ($enhancedLayout)
473: 
474:   #if ($headshot.url)
475:     <img src="$headshot.url?max_width=600&max_height=800" alt="$fullName" />
476:   #else
477:     #if ($website.exists("/images/setup/headshot_default.jpg"))
478:       <img src="/images/setup/headshot_default.jpg?max_width=600&max_height=800" alt="$fullName" />
479:     #else
480:       <img src="$website.cdn("/info/images/default_headshot.jpg?max_width=600&max_height=800")" alt="$fullName" />
481:     #end
482:   #end
483: 
484: #else
485: 
486:   #if ($!attributes.get("number").length() > 0)<span class="number">$!attributes.get("number")</span>#end
487: 
488:   #if ($headshot.url)
489:     <img src="$headshot.url?max_width=600&max_height=800" alt="$fullName" />
490:   #else
491:     #if ($website.exists("/images/setup/headshot_default.jpg"))
492:       <img src="/images/setup/headshot_default.jpg?max_width=600&max_height=800" alt="" />
493:     #else
494:       <img src="$website.cdn("/info/images/default_headshot.jpg?max_width=600&max_height=800")" alt="" />
495:     #end
496:   #end
497: 
498: #end ## ## enhancedLayout check
499: #end ## macro printHeadshot
500: 
501: #set ($socialBrands = ["facebook", "twitter", "instagram", "youtube", "twitch", "tiktok", "nil"])
502: #macro (buildSocialLink $brand $handle $icons $class)
503:   #if($brand == "facebook")
504:     #set($socialHost = "https://www.facebook.com")
505:   #elseif($brand == "twitter")
506:     #set($socialHost = "https://twitter.com")
507:   #elseif($brand == "instagram")
508:     #set($socialHost = "https://www.instagram.com")
509:   #elseif($brand == "tikTok")
510:     #set($socialHost = "https://www.tiktok.com")
511:   #elseif($brand == "twitch")
512:     #set($socialHost = "https://www.twitch.tv")
513:   #elseif($brand == "youtube")
514:     #set($socialHost = "https://www.youtube.com")
515:   #elseif($brand == "nil")
516:     #set($socialHost = "") ## We cannot define a host because the data entry can accept all NIL host services. Opendorse, Influencer, Fanatics, etc.
517:   #end
518:   #if($socialHost.length() > 0 )
519:       #set($url = "${socialHost}/${handle}")
520:   #elseif($brand == "nil")
521:       #set($url = "${handle}")
522:   #else
523:       #set($url = "")
524:   #end
525: 
526:   #set($icons = $Boolean.parseBoolean($icons))
527:   #if($icons == true)
528:   <a href="$url" class="$class" target="_blank"><span aria-label="$brand" class="icon gicon-$brand.toLowerCase()"></span></a>
529:   #else
530:   <a href="$url" class="$class" target="_blank">$handle</a>
531:   #end
532: #end
533: 
534: #macro (printBioInfo)
535: #if ($enhancedLayout)
536: 
537: <h2 class="player-heading">
538:   #if ($!attributes.get("number").length() > 0)<span class="number accent-bg">$!attributes.get("number")</span>#end
539:   <span class="name">$fullName</span>
540:   <span class="social-handle-link inline-block p-0">
541:       <ul class="d-flex align-content-center h-100 gap-2 list-unstyled m-0 p-0 flex-nowrap">
542:         #foreach ($field in $fields)
543:           #if ($socialBrands.contains($field.key.toLowerCase()) && $attributes.get($field.key).length() > 0)
544:             <li class="d-flex flex-column align-content-center justify-content-center w-auto p-0">
545:               #buildSocialLink($field.value.toLowerCase(), $!attributes.get($field.key), true, "btn btn-lg btn-link text-white p-0 fs-1")
546:             </li>
547:           #end
548:         #end
549:       </ul>
550:   </span>
551: </h2>
552: 
553: <ul>
554: #foreach ($i in [1..10])
555:   #set ($stickyKey = "bio_custom${i}_sticky")
556:   #if ($options.get($stickyKey).length() > 0 && $attributes.get("custom${i}").length() > 0)
557:     <li>
558:       <dl>
559:         <dt class="label">$options.get($stickyKey): </dt>
560:         <dd class="value">$!attributes.get("custom${i}")</dd>
561:       </dl>
562:     </li>
563:   #end
564: #end
565: 
566: #foreach ($field in $fields)
567:   #if (!$field.key.startsWith("custom"))
568:     #if ($attributes.get($field.key).length() > 0 && ($field.key != "first_name" && $field.key != "last_name" && $field.key != "number" && $field.key != "full_name"))
569:       #if ($field.key == "phone1" || $field.key == "phone2")
570:         <li>
571:           <dl>
572:             <dt class="label">Phone: </dt>
573:             <dd class="value">$!attributes.get($field.key)</dd>
574:           </dl>
575:         </li>
576:       #elseif ($field.key == "email_address")
577:         #set ($emailAdd = $attributes.get($field.key))
578:         <li>
579:           <dl>
580:             <dt class="label">Email: </dt>
581:             <dd class="value"><a href="mailto:${emailAdd}">$emailAdd</a></dd>
582:           </dl>
583:         </li>
584:       #elseif ($field.key == "weight_class")
585:         <li>
586:           <dl>
587:             <dt class="label">Class: </dt>
588:             <dd class="value">$!attributes.get($field.key)</dd>
589:           </dl>
590:         </li>
591:       #elseif ($socialBrands.contains($field.value.toLowerCase()))
592:         <li>
593:           <dl>
594:             <dt class="label">$field.value: </dt>
595:             <dd class="value">#buildSocialLink($field.value.toLowerCase(), $!attributes.get($field.key), false, "")</dd>
596:           </dl>
597:         </li>
598:       #elseif ($field.key != "position_abbr")
599:         <li>
600:           <dl>
601:             <dt class="label">$field.value: </dt>
602:             <dd class="value">$!attributes.get($field.key)</dd>
603:           </dl>
604:         </li>
605:       #end
606:     #end
607:   #end
608: #end
609: 
610: #foreach ($i in [1..10])
611:   #set ($customKey = "bio_custom${i}")
612:   #if ($options.get($customKey).length() > 0 && $attributes.get("custom${i}"))
613:     <li>
614:       <dl>
615:         <dt class="label">$options.get($customKey): </dt>
616:         <dd class="value">$!attributes.get("custom${i}")</dd>
617:       </dl>
618:     </li>
619:   #end
620: #end
621: </ul>
622: 
623: #else
624: ## default layout
625: 
626: <div class="player-name">
627:   #if ($!attributes.get("number").length() > 0)<span class="number">$!attributes.get("number")</span><span class="sep"> - </span>#end
628:   <span class="name">$fullName</span>
629:   <span class="social-handle-link inline-block p-0">
630:       <ul class="d-flex align-content-center h-100 gap-3 list-unstyled m-0">
631:         #foreach ($field in $fields)
632:           #if ($socialBrands.contains($field.key.toLowerCase()) && $attributes.get($field.key).length() > 0)
633:             <li class="d-flex flex-column align-content-center justify-content-center">
634:               #buildSocialLink($field.value.toLowerCase(), $!attributes.get($field.key), true, "btn btn-lg btn-link text-white p-0 fs-1")
635:             </li>
636:           #end
637:         #end
638:       </ul>
639:   </span>
640: </div>
641: 
642: <table role="presentation">
643: #foreach ($i in [1..10])
644:   #set ($stickyKey = "bio_custom${i}_sticky")
645:   #if ($options.get($stickyKey).length() > 0 && $attributes.get("custom${i}").length() > 0)
646:     <tr>
647:       <td class="label">$options.get($stickyKey): </td>
648:       <td class="value">$!attributes.get("custom${i}")</td>
649:     </tr>
650:   #end
651: #end
652: 
653: #foreach ($field in $fields)
654:   #if (!$field.key.startsWith("custom"))
655:     #if ($attributes.get($field.key).length() > 0 && ($field.key != "first_name" && $field.key != "last_name" && $field.key != "number" && $field.key != "full_name"))
656:       #if ($field.key == "phone1" || $field.key == "phone2")
657:         <tr>
658:           <td class="label">Phone: </td>
659:           <td class="value">$!attributes.get($field.key)</td>
660:         </tr>
661:       #elseif ($field.key == "email_address")
662:         #set ($emailAdd = $attributes.get($field.key))
663:         <tr>
664:           <td class="label">Email: </td>
665:           <td class="value"><a href="mailto:${emailAdd}">$emailAdd</a></td>
666:         </tr>
667:       #elseif ($field.key == "weight_class")
668:         <tr>
669:           <td class="label">Class: </td>
670:           <td class="value">$!attributes.get($field.key)</td>
671:         </tr>
672:       #elseif ($socialBrands.contains($field.value.toLowerCase()))
673:         <tr>
674:           <td class="label">$field.value: </td>
675:           <td class="value">#buildSocialLink($field.value.toLowerCase(), $!attributes.get($field.key), false, "")</td>
676:         </tr>
677:       #elseif ($field.key != "position_abbr")
678:         <tr>
679:           <td class="label">$field.value: </td>
680:           <td class="value">$!attributes.get($field.key)</td>
681:         </tr>
682:       #end
683:     #end
684:   #end
685: #end
686: 
687: #foreach ($i in [1..10])
688:   #set ($customKey = "bio_custom${i}")
689:   #if ($options.get($customKey).length() > 0 && $attributes.get("custom${i}"))
690:     <tr>
691:       <td class="label">$options.get($customKey): </td>
692:       <td class="value">$!attributes.get("custom${i}")</td>
693:     </tr>
694:   #end
695: #end
696: </table>
697: #end ## enhancedLayout check
698: #end ## macro printBioInfo
699: 
700: #macro (printActionShots)
701: #if ($showActionShots)
702: 	## BANNERS SLIDER
703:     #set ($slickSettings = {
704: 		"autoplay": true,
705:         "fade": true,
706:         "arrows": false,
707:         "slidesToShow": 1,
708:         "slidesToScroll": 1,
709:         "lazyLoad": "ondemand",
710:         "responsive": "none"
711:     })
712:     #set ($slickSettings = $slickSettings.toString().replace("=", ":"))
713:     <div class="action-shots clearfix" data-player-photo-count="$playerPhotos.size()">
714:         <div class="slider" data-module="slick-slider-init" data-slick-settings="$slickSettings">
715:             #set ($playerPhotos = $tool.sorter.sort($playerPhotos, "lastUpdated:desc"))
716:             #foreach ($photo in $playerPhotos)
717: 				#if ($velocityCount <= $actionShotsLimit)
718:                     #set ($imgAlt = "Action shot for ${page.title} image ${velocityCount}")
719:                     #if ($photo.altText.length() > 0)
720:                         #set ($imgAlt = $photo.altText)
721:                     #elseif( $photo.title.length() > 0 )
722:                         #set ($imgAlt = $photo.title)
723:                     #end
724:             		<div class="image">
725:             			<img data-lazy="$photo.url" alt="$imgAlt" data-lastupdated="$photo.lastUpdated"/>
726:             	    </div>
727: 				#end
728:     	    #end
729: 	    </div>
730:     </div>
731: #end
732: #end ## macro printActionShots
733: 
734: #macro (printHighlights)
735: #if ($highlights && $showHighlights)
736:   <div class="highlights #if ($enhancedLayout) highlights-bio-enhanced #else highlights-bio #end clearfix">
737:     #foreach ($highlight in $highlights.keySet())
738:       #set ($value = "-")
739:       #set ($value = $formatter.formatNumber($stats.get($highlight), $formats.get($highlight)))
740:       <div class="stat clearfix">
741:         <span class="stat-title">$!highlights.get($highlight)</span>
742:         <span class="stat-value">$value</span>
743:       </div>
744:     #end
745:   </div>
746: #end
747: #end ## macro printHighlights
748: #macro (printRoster)
749: #if ($enhancedLayout)
750:   $website.includeAgain("${page.url}?tmpl=roster-switcher-template&id=roster-list")
751: #else
752: #if ($page.contentType == "loki/bio")
753:   #set ($headlinesFeaturedSize = 0)
754:   #foreach ($featuredPage in $page.headlinesFeatured)
755:     #if ($featuredPage.contentType == "loki/headlines")
756:       #set ($headlinesFeaturedSize = $headlinesFeaturedSize + 1)
757:     #end
758:   #end
759:   #if ($headlinesFeaturedSize > 0)
760:       <select class="roster-select-list" aria-label="Select a player to view its full bio from the list of options below.">
761:         <option selected="selected">Related Bios</option>
762:         #foreach ($featuredPage in $page.headlinesFeatured)
763:           #if ($featuredPage.contentType == "loki/headlines")
764:             $website.includeAgain("${featuredPage.url}?tmpl=roster-list-template&current_url=${page.url}")
765: 		  #end
766: 	    #end
767:       </select>
768:   #end
769: #elseif ($page.contentType == "loki/bio-network")
770:   #set ($relatedPlayers = $page.sectionPage.children)
771:   #set ($teamNames = {})
772:   #foreach ($relatedPlayer in $relatedPlayers)
773:     #if ($relatedPlayer.contentType == "loki/bio-network")
774:       #set ($relatedPlayerObj = $relatedPlayer.getDataAsObject().getAttributes())
775:       #set ($teamName = $relatedPlayerObj.get("team"))
776:       #if ($teamName.length() > 0)
777:         #if (!$teamNames.containsValue($teamName))
778:           $!teamNames.put($tool.math.add($teamNames.size(), 1), $teamName)
779:         #end
780:       #end
781:     #end
782:   #end
783: 
784:   <select class="roster-select-list" aria-label="Select a player to view its full bio from the list of options below.">
785:   #foreach ($i in [1..$teamNames.size()])
786:     #if ($teamNames.size() > 1)
787:       <optgroup label="$teamNames.get($i)">
788:     #end
789: 
790:     #foreach ($relatedPlayer in $relatedPlayers)
791:       #if ($relatedPlayer.contentType == "loki/bio-network")
792:         #set ($relatedPlayerObj = $relatedPlayer.getDataAsObject().getAttributes())
793:         #set ($teamName = $relatedPlayerObj.get("team"))
794:         #if ($teamName.length() > 0 && $teamName == $teamNames.get($i))
795:           #set ($playerFirstName = $relatedPlayerObj.get("first_name"))
796:           #set ($playerLastName = $relatedPlayerObj.get("last_name"))
797:           #if ($page.url == $relatedPlayer.url)
798:             <option value="$relatedPlayer.url" selected="selected">${playerFirstName} ${playerLastName}</option>
799:           #else
800:             <option value="$relatedPlayer.url">${playerFirstName} ${playerLastName}</option>
801:           #end
802:         #end
803:       #end
804:     #end
805: 
806:     #if ($teamNames.size() > 1)
807:       </optgroup>
808:     #end
809:   #end
810:   </select>
811: #end
812: #end ## enhancedLayout check
813: #end ## macro printRoster
814: 
815: ################################################## END MACROS  #############################################################
816: 
817: #if ($attributes.get("full_name").length() > 0)
818:   #set ($fullName = $attributes.get("full_name"))
819: #else
820:   #set ($firstName = $!attributes.get("first_name"))
821:   #set ($lastName = $!attributes.get("last_name"))
822:   #set ($fullName = "${firstName} ${lastName}")
823: #end
824: 
825: #set ($actionShots = false)
826: #if ($enhancedLayout && $playerPhotos.size() > 0)
827:   #set ($actionShots = true)
828: #end
829: 
830: #if ($enhancedLayout)
831:   #set ($rootClass = "bio-enhanced")
832:   #if ($actionShots && $showActionShots)
833:   	#set ($rootClass = "${rootClass} action")
834:   #else
835:   	#set ($rootClass = "${rootClass} plain")
836:   #end
837: #else
838:   #set ($rootClass = "bio-wrap")
839: #end
840: 
841: ## FULL ROSTER
842: <div class="${rootClass} #if ($highlights) bio-wrap-has-highlights #end clearfix" data-module="stats/responsive-container">
843: 
844: ## RELATED BIOS
845: #if ($showRoster)
846:   <div class="related-bios clearfix">#printRoster</div>
847: #end
848: 
849: #if ($actionShots)
850:   #printActionShots
851: #end
852: 
853: <div class="head clearfix">
854: <div class="clearfix">
855: 
856: <div class="player-about clearfix">
857:   <div class="player-headshot">#printHeadshot</div>
858:   <div class="player-info">#printBioInfo</div>
859: </div>
860: 
861: #printHighlights
862: 
863: </div>
864: </div> ## head
865: 
866: #if ($view.length() > 0)
867: <div class="body clearfix">
868: 
869: <div class="tab-container primary clearfix" data-module="stats/tabs" data-type="primary">
870: <div class="tab-nav" data-module="jscroll" data-momentum="false">
871:   <div>
872:   <ul class="clearfix">
873:   #if ($hasSynopsis || $hasBioBrief)
874:     <li #if ($view == "bio") class="active" #end><a href="${page.url}?view=bio">Bio</a></li>
875:   #end
876: 
877:   #if ($statsURL.length() > 0)
878:     <li #if ($view == "profile") class="active" #end><a href="${page.url}?view=profile">Player Profile</a></li>
879:     <li #if ($view == "gamelog") class="active" #end><a href="${page.url}?view=gamelog">Game Log</a></li>
880:     #if ($showCareer)
881:       <li #if ($view == "career") class="active" #end><a href="${page.url}?view=career">Career Stats</a></li>
882:     #end
883:     <li #if ($view == "splits") class="active" #end><a href="${page.url}?view=splits">Split Stats</a></li>
884:   #end
885: 
886:   #if ($hasHTMLStats)
887:     <li #if ($view == "htmlstats") class="active" #end><a href="${page.url}?view=htmlstats">HTML Stats</a></li>
888:   #end
889: 
890:   #if ($releases.size() > 0)
891: 	<li #if ($view == "news") class="active" #end><a href="${page.url}?view=news">News</a></li>
892:   #end
893: 
894:   #if ($playerPhotos.size() > 0)
895: 	<li #if ($view == "photos") class="active" #end><a href="${page.url}?view=photos">Photos</a></li>
896:   #end
897: 
898:   #if ($playerVideos.size() > 0)
899:     <li #if ($view == "videos") class="active" #end><a href="${page.url}?view=videos">Videos</a></li>
900:   #end
901:   </ul>
902:   </div>
903: </div> ## tab-nav
904: 
905: <div class="tab-panels clearfix">
906: 
907: ## BIO
908: #if ($hasSynopsis || $hasBioBrief)
909: 
910: #set ($class = "tab-panel clearfix")
911: #if ($view == "bio")
912:   #set ($class = "tab-panel active clearfix")
913: #end
914: <div class="${class}">
915: 
916: <div class="synopsis clearfix">
917: #if ($hasSynopsis)
918:   $synopsis
919: #elseif ($hasBioBrief)
920:   $website.include("$bioBriefURL")
921: #end
922: </div>
923: 
924: </div> ## tab-panel
925: #end
926: ## BIO
927: 
928: ## STATS
929: #if ($statsURL.length() > 0)
930: 
931: ## PROFILE
932: #set ($class = "tab-panel clearfix")
933: #if ($view == "profile")
934:   #set ($class = "tab-panel active clearfix")
935: #end
936: <div class="${class}">
937: <div class="stats-wrap clearfix">
938: 
939: ## LAST SIX GAMES
940: <div class="stats-box half">
941: #printRecentGames()
942: </div>
943: 
944: ## RANKING
945: <div class="stats-box half">
946: #if ($statPos.length() > 0)
947:   $website.include("players?tmpl=stats-bios-rank-template&rank=${playerId}&pos=${statPos}")
948: #end
949: </div>
950: 
951: </div> ## stats-wrap
952: </div> ## tab-content
953: ## PROFILE
954: 
955: ## GAMELOG
956: #set ($class = "tab-panel clearfix")
957: #if ($view == "gamelog")
958:   #set ($class = "tab-panel active clearfix")
959: #end
960: 
961: #set ($activePos = $statPos)
962: #if ($view == "gamelog" && $paramPos.length() > 0)
963:   #if ($positions.get($paramPos).length() > 0)
964:     #set ($activePos = $positions.get($paramPos))
965:   #end
966: #end
967: 
968: <div class="${class}">
969: 
970: #if ($gamelogsCategoriesLabels)
971: <div class="tab-container clearfix secondary" data-module="stats/tabs" data-type="secondary">
972:   <div class="tab-nav" data-module="jscroll" data-momentum="false">
973:     <div>
974:     <ul class="clearfix">
975:     #foreach($gamelogsCatLabel in $gamelogsCategoriesLabels.entrySet())
976:       #set($gamelogsCatLabelVal = $gamelogsCatLabel.value)
977: 
978:       #if ($locale == "en_gb" && $gamelogsCatLabelVal == "Defense")
979:         #set($gamelogsCatLabelVal = "Defence")
980:       #end
981: 
982:       <li #if ($activePos == $gamelogsCatLabel.key) class="active" #end><a href="${page.url}?view=gamelog&pos=${gamelogsCatLabel.key}" role="button" aria-label="Game Log: ${gamelogsCatLabelVal}">$gamelogsCatLabelVal</a></li>
983:     #end
984:     </ul>
985: 	</div>
986:   </div>
987:   <div class="tab-panels">
988:   #foreach($gamelogsCatLabel in $gamelogsCategoriesLabels.entrySet())
989:     #set ($class = "tab-panel clearfix")
990:     #if ($gamelogsCatLabel.key == $activePos)
991:       #set ($class = "tab-panel active clearfix")
992:     #end
993:     <div class="${class}">
994:       <div class="stats-wrap clearfix">#gamelogData($gamelogsCatLabel.key)</div>
995: 	</div>
996:   #end
997:   </div>
998: </div>
999: #else
1000:   <div class="stats-wrap clearfix">#gamelogData($pos)</div>
1001: #end
1002: 
1003: </div> ## tab-panel
1004: ## GAMELOG
1005: 
1006: 
1007: ## CAREER
1008: #if ($showCareer)
1009: 
1010: #set ($activePos = $statPos)
1011: #if ($view == "career" && $paramPos.length() > 0)
1012:   #if ($positions.get($paramPos).length() > 0)
1013:     #set ($activePos = $positions.get($paramPos))
1014:   #end
1015: #end
1016: 
1017: #set ($class = "tab-panel clearfix")
1018: #if ($view == "career")
1019:   #set ($class = "tab-panel active clearfix")
1020: #end
1021: 
1022: <div class="${class}">
1023: 
1024: #if ($briefsCategoriesLabels)
1025:   #printCategories($briefsCategoriesLabels "career" "Career Stats")
1026: #else
1027:   <div class="stats-wrap clearfix">#careerData($activePos)</div>
1028: #end
1029: 
1030: </div> ## tab-panel
1031: #end
1032: ## CAREER
1033: 
1034: ## SPLITS
1035: #set ($class = "tab-panel clearfix")
1036: #if ($view == "splits")
1037: 	#set ($class = "tab-panel active clearfix")
1038: #end
1039: 
1040: #set ($activePos = $statPos)
1041: #if ($view == "splits" && $paramPos.length() > 0)
1042:   #if ($positions.get($paramPos).length() > 0)
1043:     #set ($activePos = $positions.get($paramPos))
1044:   #end
1045: #end
1046: 
1047: <div class="${class}">
1048: 
1049: #if ($briefsCategoriesLabels)
1050:   #printCategories($briefsCategoriesLabels "splits" "Splits Stats")
1051: #else
1052:   <div class="stats-wrap clearfix">#splitsData($pos)</div>
1053: #end
1054: 
1055: </div> ## tab-panel
1056: ## SPLITS
1057: 
1058: #end
1059: ## STATS
1060: 
1061: ## HTML STATS
1062: #if ($hasHTMLStats)
1063: 
1064: #set ($class = "tab-panel clearfix")
1065: #if ($view == "htmlstats")
1066:   #set ($class = "tab-panel active clearfix")
1067: #end
1068: <div class="${class}">
1069:   <a href="${htmlStatsURL}" class="bio-htmlstats-identifier">Click to view HTML Stats</a>
1070: </div>
1071: 
1072: #end
1073: ## HTML STATS
1074: 
1075: ## NEWS
1076: #if ($releases.size() > 0)
1077: #set ($class = "tab-panel clearfix")
1078: #if ($view == "news")
1079:   #set ($class = "tab-panel active clearfix")
1080: #end
1081: <div class="${class}">
1082: 	#printGrid($releases, "article")
1083: </div> ## tab-content
1084: #end
1085: ## NEWS
1086: 
1087: ## PHOTOS
1088: #if ($playerPhotos.size() > 0)
1089: #set ($class = "tab-panel clearfix")
1090: #if ($view == "photos")
1091:   #set ($class = "tab-panel active clearfix")
1092: #end
1093: <div class="${class}">
1094:     $website.includeAgain("${page.url}?tmpl=bio-photos-template")
1095: </div> ## tab-content
1096: #end
1097: ## PHOTOS
1098: 
1099: ## VIDEOS
1100: #if ($playerVideos.size() > 0)
1101:   #set ($class = "tab-panel clearfix")
1102:   #if ($view == "videos")
1103:     #set ($class = "tab-panel active clearfix")
1104:   #end
1105: <div class="${class}">
1106: 	#printGrid($playerVideos, "video")
1107: </div> ## tab-content
1108: #end
1109: ## VIDEOS
1110: 
1111: </div> ## tab-panels
1112: </div> ## tab-container
1113: </div> ## body
1114: #end
1115: 
1116: $wiki
1117: </div> ## ends bio-wrap
1118: 
1119: ## GLOBAL ADS SERVER
1120: #if ($website.ads.isAdvertisingEnabled('BIOS'))
1121:         $website.includeAgain("global-adserver-slots?adSlot=bios")
1122: #end