There was a problem with a Velocity script
Pagesports/bsb/2024/bios/bio-template
ErrorInvocation of method 'includeAgain' in class com.prestosports.render.ContentEngineInvoker threw exception javax.servlet.ServletException: javax.servlet.ServletException: java.lang.RuntimeException: Unhandled error with API at 2bd4wd5qbyfif23csports/bsb/2024/bios/bio-template[line 13, column 12]
Page source:
1: <script src="${website.cdn("/info/klass.min.js")}"></script>
2: 
3: ## PICK UP OPTIONS
4: $website.include("options")
5: #set ($options = $request.getAttribute("options"))
6: #set ($locale = "en_us")
7: #set ($locale = $options.get("locale"))
8: 
9: ## HACK TO GET STATS URL FROM RENDERER... NEEDS SERVER CHANGE
10: #set ($bioObject = $page.getDataAsObject())
11: #set ($statsURL = $bioObject.statsURL)
12: #if ($statsURL.length() > 0)
13:   $website.includeAgain("${statsURL}?tmpl=bio-stats-template")
14:   ## various settings to get the variables set
15:   #set ($events = $request.getAttribute("bio_events"))
16:   #set ($seasons = $request.getAttribute("bio_seasons"))
17:   #set ($career = $request.getAttribute("bio_career"))
18:   #set ($labels = $request.getAttribute("bio_labels"))
19:   #set ($briefs = $request.getAttribute("bio_briefs"))
20:   #set ($gamelogs = $request.getAttribute("bio_gamelogs"))
21:   #set ($splits = $request.getAttribute("bio_splits"))
22:   #set ($statPosition = $request.getAttribute("bio_position"))
23:   #set ($positions = $request.getAttribute("bio_positions"))
24:   #set ($playerId = $request.getAttribute("bio_player_id"))
25:   #set ($highlights = $request.getAttribute("bio_highlights"))
26:   #set ($formats = $request.getAttribute("bio_formats"))
27:   #set ($gamelogsCategoriesLabels = $request.getAttribute("bio_gamelogs_labels"))
28:   #set ($briefsCategoriesLabels = $request.getAttribute("bio_briefs_labels"))
29:   #set ($gamesResults = $request.getAttribute("bio_games_results"))
30:   #set ($monthsPlayed = $request.getAttribute("bio_months_played"))
31:   #set ($rosterTransactions = $request.getAttribute("roster_transactions"))
32: #end
33: 
34: #set ($pos = "")
35: #if($attributes.get("position_stat"))
36:     #set ($pos = $attributes.get("position_stat"))
37: #else
38:     #set ($pos = $attributes.get("position"))
39:     #set ($pos = $statPosition)
40:     #set ($posVec = $pos.split("/"))
41:     #set ($pos = $posVec[0])
42: #end
43: #set ($pos = $pos.toLowerCase())
44: #set ($statPos = $positions.get($pos))
45: #set ($paramPos = $request.getParameter("pos"))
46: 
47: #set ($playerId = $attributes.get("playerId"))
48: #set ($stats = $splits.overall)
49: #set ($highlights = $highlights.get($statPos))
50: 
51: #set ($showHighlights = true)
52: #if ($options.get("bio_show_highlights") && $options.get("bio_show_highlights") == false)
53: 	#set ($showHighlights = false)
54: #end
55: 
56: #set ($enhancedLayout = false)
57: #if ($options.get("bio_enhanced_layout") == "yes" || $request.getParameter("bio_enhanced_layout") == true || $request.getAttribute("enhanced") == "true")
58:     #set ($enhancedLayout = true)
59: #elseif($request.getParameter("bio_enhanced_layout") == false || $request.getAttribute("enhanced") == "false")
60:     #set ($enhancedLayout = false)
61: #end
62: 
63: #set ($showActionShots = true)
64: #if ($options.get("bio_show_action_shots") && $options.get("bio_show_action_shots") == false)
65: 	#set ($showActionShots = false)
66: #end
67: 
68: #set ($showDate = true)
69: #if ($options.get("news_layout_show_date") == "no")
70:     #set ($showDate = false)
71: #end
72: 
73: #set ($showLeadin = true)
74: #if ($options.get("news_layout_show_leadin") == "no")
75:     #set ($showLeadin = false)
76: #end
77: 
78: #set ($dateFormat = "MMMM dd, yyyy")
79: #if ($options.get("site_date_format").length() > 0) #set ($dateFormat = $options.get("site_date_format")) #end
80: 
81: #set ($thumbnail-orientation = "ratio ratio-16x9 ratio-adaptive")
82: #if ($options.get("news_thumbnail_orientation") == "portrait") ## default view from options
83:     #set ($thumbnail-orientation = "ratio ratio-3x4")
84: #elseif ($options.get("news_thumbnail_orientation") == "landscape")
85:     #set ($thumbnail-orientation = "ratio ratio-16x9")
86: #elseif ($options.get("news_thumbnail_orientation") == "adaptive")
87:     #set ($thumbnail-orientation = "embed-responsive-adaptive")
88: #elseif ($request.getParameter("thumbnail_orientation") == "portrait") ## default view from include parameter
89:     #set ($thumbnail-orientation = "ratio ratio-3x4")
90: #end
91: 
92: #set ($showThumb = true)
93: #if ($options.get("news_layout_show_thumb") == "no")
94:     #set ($showThumb = false)
95: #end
96: #set ($thumbWidth = 767)
97: 
98: #set ($actionShotsLimit = 5)
99: #set ($actionShotsLimit = $tool.math.toInteger($options.get("bio_action_shots_limit")))
100: 
101: #set ($showCareer = $wiki.valid() && $seasons)
102: #if ("yes" == $options.get("stats_show_career") && $seasons)
103:   #set ($showCareer = true)
104: #end
105: 
106: #set ($hasEvents = $events.size() > 0)
107: #set ($hasSynopsis = $synopsis.trim().length() > 0)
108: #set ($htmlStatsURL = "${page.url}-stats")
109: #set ($hasHTMLStats = $website.exists($htmlStatsURL))
110: #set ($bioBriefURL = "${page.url}-brief")
111: #set ($hasBioBrief = $website.exists("$bioBriefURL"))
112: #set ($showRoster = ($page.contentType == "loki/bio" && $page.headlinesFeatured.size() > 0) || ($page.contentType == "loki/bio-network" && $page.sectionPage.children.size() > 1))
113: #if ($options.get("bio_hide_roster") == true)
114:   #set ($showRoster = false)
115: #end
116: 
117: #if ($hasEvents)
118:     $request.setAttribute("icl-dataTables-script", true)
119: #end
120: 
121: #set ($view = "")
122: #if ($hasSynopsis || $hasBioBrief)
123:   #set ($view = "bio")
124: #elseif ($statsURL.length() > 0)
125:   #set ($view = "profile")
126: #elseif ($hasHTMLStats)
127:   #set ($view = "htmlstats")
128: #elseif ($releases.size() > 0)
129:   #set ($view = "news")
130: #elseif ($playerPhotos.size() > 0)
131:   #set ($view = "photos")
132: #elseif ($playerVideos.size() > 0)
133:   #set ($view = "videos")
134: #end
135: 
136: #if ($options.get("bio_default_view").length() > 0)
137:     #set ($checkView = $options.get("bio_default_view"))
138: #else
139:     ## THIS ESTABLISHES A DEFAULT TAB FOR NEW BOOTSTRAP THEMES
140:     #if ($hasSynopsis || $hasBioBrief)
141:         #set ($checkView = "bio")
142:     #elseif ($statsURL.length() > 0)
143:         #set ($checkView = "profile")
144:     #elseif ($releases.size() > 0)
145:         #set ($checkView = "news")
146:     #end
147: #end
148: 
149: #if ($request.getParameter("view"))
150:   #set ($checkView = $request.getParameter("view"))
151: #end
152: 
153: #if ($checkView == "profile" && $statsURL.length() > 0)
154:   #set ($view = "profile")
155: #elseif ($checkView == "bio" && ($hasSynopsis || $hasBioBrief))
156:   #set ($view = "bio")
157: #elseif ($checkView == "gamelog" && $statsURL.length() > 0)
158:   #set ($view = "gamelog")
159: #elseif ($checkView == "career" && $showCareer)
160:   #set ($view = "career")
161: #elseif ($checkView == "splits" && $statsURL.length() > 0)
162:   #set ($view = "splits")
163: #elseif ($checkView == "htmlstats" && $hasHTMLStats)
164:   #set ($view = "htmlstats")
165: #elseif ($checkView == "news" && $releases.size() > 0)
166:   #set ($view = "news")
167: #elseif ($checkView == "photos" && $playerPhotos.size() > 0)
168:   #set ($view = "photos")
169: #elseif ($checkView == "videos" && $playerVideos.size() > 0)
170:     #set ($view = "videos")
171: #elseif ($checkView == "weplayed")
172:     #set ($view = "weplayed")
173: #end
174: 
175: #macro (printResultAriaLabel $event)
176:     #set ($ariaLabel = "${event.sport} event: ${formatter.formatDate($event.date, 'MMMM d hh:mm a:')}")
177:     #if ($event.neutralSite.length() > 0 || $event.home)
178:     	#set ($ariaLabel = "${ariaLabel} vs.")
179:     #else
180:     	#set ($ariaLabel = "${ariaLabel} at")
181:     #end
182:     #set ($ariaLabel = "${ariaLabel} ${event.opponent.name}:")
183:     #if ($event.neutralSite.length() > 0)
184:     	#set ($ariaLabel = "${ariaLabel} @ ${event.neutralSite}:")
185:     #end
186:     #set ($ariaLabel = "${ariaLabel} Box Score")
187:     aria-label="$ariaLabel"
188: #end
189: 
190: #macro(playIcon $url)
191:     <a href="$url" class="play-btn video-btn-overlay" onclick="return(false);" onmouseup="return(false);">
192:         <span class="center-icon-pre">
193:             <span class="center-icon">
194:                 <span class="visually-hidden">Play Video</span>
195:                 <span class="fab fa-youtube"></span>
196:             </span>
197:         </span>
198:     </a>
199: #end
200: 
201: #macro (printVideo $article)
202:     #if ($article.contentType == "loki/youtube")
203:         #set ($videoID = $article.dataAsString)
204:         <img src="https://i3.ytimg.com/vi/${videoID}/maxresdefault.jpg" onerror="this.onerror=null; this.src='https://i3.ytimg.com/vi/${videoID}/mqdefault.jpg';" alt="video thumbnail for $article.thumbnailAlt" class="card-img-top img-fluid" />
205:         #playIcon($article.url)
206:     #end
207: 
208:     #if ($article.contentType == "loki/video")
209:     <video class="player" muted="true">
210:         <source src="${article.url}?dec=" type="video/mp4" />
211:     </video>
212:         #playIcon($article.url)
213:     #end
214: #end
215: 
216: ## ARTICLE MENTIONS MACRO
217: #macro (printReleases $items $type)
218:     <div class="news-releases news-layout grid bio-news-mentions">
219:         <div class="cards">
220:             #foreach ($article in $items)
221: 
222:                 ## CATEGORY / TITLE
223:                 #set ($title = $article.title)
224:                 #set ($category = "Article")
225: 
226:                 #if($article.contentType == "loki/bio")
227:                     #set ($category = "Bio")
228:                 #elseif ($article.contentType == "video/x-flv" || $article.contentType == "loki/video" || $article.contentType == "loki/youtube")
229:                     #set ($category = "Video")
230:                 #end
231: 
232:                 #if ($article.url.startsWith("/sports/"))
233:                     #set ($sportKey = $article.url.split("/").get(2))
234:                     #if ($sportLabels.containsKey($sportKey))
235:                         #set ($category = $sportLabels.get($sportKey))
236:                     #end
237:                 #else
238:                     #set ($articleSection = $article.sectionPage)
239:                     #foreach ($i in [1..5])
240:                         #if ($articleSection.url.length() == 0)
241:                             #break
242:                         #elseif ($articleSection.sectionPage.url.length() == 0) ## if parent is a root section
243:                             #if ($articleSection.title.length() > 0)
244:                                 #set ($category = $articleSection.title)
245:                             #else
246:                                 #set ($firstChar = $articleSection.name.substring(0, 1).toUpperCase())
247:                                 #set ($afterFirstChars = $articleSection.name.substring(1))
248:                                 #set ($category = "${firstChar}${afterFirstChars}")
249:                             #end
250:                             #break
251:                         #end
252:                         #set ($articleSection = $articleSection.sectionPage)
253:                     #end
254:                 #end
255:                 ## END CATEGORY / TITLE
256: 
257:                 #set ($altText = $article.title)
258:                 #if ($article.thumbnailURL)
259:                     #if ($article.thumbnailPage.altText.length() > 0)
260:                         #set ($altText = "$article.thumbnailPage.altText")
261:                     #end
262:                 #end
263: 
264:                 #if ($article.thumbnailURL.length() > 0)
265:                     #set ($src = $article.thumbnailURL)
266:                 #elseif ($website.exists("/images/setup/default-thumbnail.png"))
267:                     #set ($src = "/images/setup/default-thumbnail.png")
268:                 #elseif ($website.exists("/images/setup/thumbnail_default.jpg"))
269:                     #set ($src = "/images/setup/thumbnail_default.jpg")
270:                 #else
271:                     #set ($src = "/info/images/default-thumbnail.png")
272:                 #end
273:                 #set ($thumbnailURL = "${src}?max_width=${thumbWidth}")
274: 
275:                 #set ($cardClass = "card")
276:                 #if ($velocityCount > $showSize)
277:                     #set ($cardClass = "card hidden")
278:                 #end
279: 
280:                 <div class="${cardClass} border position-relative">
281:                     <div class="card-inner position-relative">
282:                         #if ($showThumb == true)
283:                             <div class="thumb overflow-hidden card-img-top ${thumbnail-orientation}" style="background-image:url('${thumbnailURL}'); background-size:cover; background-position:center;">
284:                                 <img src="${thumbnailURL}" alt="${altText}" class="img-fluid" />
285:                                 #printVideo($article)
286:                             </div>
287:                         #end
288:                         <div class="card-body border-top rounded-bottom bg-white">
289:                             <div class="entry-body-header">
290:                                 <ul class="entry-meta list-unstyled d-flex align-items-center justify-content-between mb-0 text-muted small">
291:                                     <li class="entry-category">$category</li>
292:                                     <li class="entry-header-date d-none d-lg-block hide-on-grid-view">
293:                                         <span class="d-flex align-items-center">
294:                                             <span class="fa-regular fa-calendar"></span>
295:                                             <span class="ms-2">$formatter.formatDate($article.date, $dateFormat)</span>
296:                                         </span>
297:                                     </li>
298:                                 </ul>
299:                                 <div class="card-title entry-title fw-bold mb-0">
300:                                     <a class="text-decoration-none stretched-link clamp-2" href="$article.url">$title</a>
301:                                 </div>
302:                                 #if ($showLeadin == true && $article.leadIn.length() > 0)
303:                                     <p class="card-text entry-summary clamp-3">$article.leadIn</p>
304:                                 #end
305:                             </div>
306:                         </div>
307:                         #if ($showDate == true && $article.date)
308:                             <div class="card-footer border-top rounded-bottom bg-white text-muted p-3">
309:                                 <ul class="list-unstyled d-flex align-items-center m-0">
310:                                     <li class="card-entry-date">
311:                                         <span class="small d-flex align-items-center">
312:                                             <span class="fa-regular fa-calendar"></span>
313:                                             <span class="ms-2 date">$formatter.formatDate($article.date, $dateFormat)</span>
314:                                         </span>
315:                                     </li>
316:                                 </ul>
317:                             </div>
318:                         #end
319:                     </div>
320:                 </div> ## card
321:             #end ## loop
322:         </div>
323:     </div>
324: #end ## printReleases
325: 
326: #macro (gamelogData $p)
327: 
328: #set ($p = $positions.get($p))
329: #set ($gamelogs = $gamelogs.get($p))
330: 
331: #if ($hasEvents)
332: <div class="stats-box full clearfix">
333:     <div class="table-responsive-via-datatables">
334:         <table class="table table-hover nowrap w-100" data-searching="false" data-ordering="false" data-paging="false" data-info="false" data-filtering="false" data-scroll-y="50vh" data-module="theme-module/table-sort-bs">
335:             <thead class="thead-dark">
336:                 <tr>
337:                     <th scope="col">Date</th>
338:                     <th scope="col" class="text-start">Opponent</th>
339:                     <th scope="col" class="">Score</th>
340:                     #foreach ($gamelog in $gamelogs)
341:                       <th scope="col" class="text-uppercase text-center">$gamelog</th>
342:                     #end
343:                 </tr>
344:             </thead>
345:             <tbody>
346:                 #foreach ($event in $events)
347:                   <tr>
348:                     <td scope="row">$formatter.formatDate($event.event.date, "MMM d")</td>
349:                     <td class="text-start">
350:                       #if ($event.event.neutralSite.length() > 0) vs. #elseif (!$event.event.home) at #end
351:                       $event.event.opponent.name
352:                     </td>
353:                     <td class="">
354:                     #if ($event.event.statusCode >= 0)
355:                       #if ($event.event.eventId.length() > 0 && $event.stats.size() > 0)
356:                           <a #printResultAriaLabel($event.event) href="../boxscores/${formatter.formatBoxScoreLink($event.event)}">${event.event.APResult}</a>
357:                       #else
358:                       ${event.event.APResult}
359:                       #end
360:                     #end
361:                     </td>
362:                     #foreach ($gamelog in $gamelogs.keySet())
363:                       #set ($value = "-")
364:                       #set ($value = $formatter.formatNumber($event.stats.get($gamelog), $formats.get($gamelog)))
365:                       <td class="text-center">$value</td>
366:                     #end
367:                   </tr>
368:                 #end
369:             </tbody>
370:         </table>
371:     </div> ## table-responsive
372: </div> ## stats-box
373: #end
374: 
375: #end ## macro gamelogData
376: 
377: #macro (splitWithLabels $statPosBriefs $label $stats)
378:     <tr>
379:         <th scope="row" class="text-end">${label}</th>
380: 
381:         #if ($rosterTransactions && $v == "career")
382:             #set($keys =  $stats.names())
383:             #set($array = $keys.toString().replace('"','').split(","))
384:             #foreach ($brief in $statPosBriefs.keySet())
385:                 #set ($value = "-")
386:                 #if($array.contains($brief))
387:                     #set ($value = $!formatter.formatNumber($tool.math.toDouble($stats.get($brief)), $formats.get($brief)))
388:                  #end
389:                 <td class="text-center">#if ($value.length() > 0) $value #else - #end</td>
390:             #end
391:         #else
392:             #foreach ($brief in $statPosBriefs.keySet())
393:                 #set ($value = "-")
394:                 #set ($value = $!formatter.formatNumber($stats.get($brief), $formats.get($brief)))
395:                 <td class="text-center">#if ($value.length() > 0) $value #else - #end</td>
396:             #end
397:         #end
398:     </tr>
399: #end
400: 
401: #macro (careerData $p)
402: #set ($p = $positions.get($p))
403: #set ($statPosBriefs = $briefs.get($p))
404: 
405: <div class="stats-box full clearfix">
406:     <div class="table-responsive-via-datatables table-responsive-webkit-overflow-scroll-fix">
407:         <table class="table table-hover nowrap w-100" data-searching="false" data-ordering="false" data-paging="false" data-info="false" data-filtering="false" data-scroll-y="50vh" data-module="theme-module/table-sort-bs">
408:             <thead class="thead-dark">
409:                 <tr>
410:                     <th></th>
411:                     #foreach ($brief in $statPosBriefs)
412:                         <th scope="col" class="text-center text-uppercase">$brief</th>
413:                     #end
414:                 </tr>
415:             </thead>
416:             <tbody>
417:                 #if ($rosterTransactions)
418:                     #set ($seasonLength = $career.seasons.length())
419:                     #foreach ($index in [0..$tool.math.sub($seasonLength, 1)])
420:                         #set($season = $career.seasons[$index])
421:                         #if($season.seasonStatsURL != "null")
422:                             #set ($label = "<a href='${season.seasonStatsURL}?view=profile'>$season.seasonName.replaceAll('^[^0-9-]*','') - $season.team.teamName</a>")
423:                         #else
424:                             #set ($label = "$season.seasonName.replaceAll('^[^0-9-]*','') - $season.team.teamName ")
425:                         #end
426:                         #splitWithLabels($statPosBriefs, $label, $season.player.stats)
427:                     #end
428:                     #splitWithLabels($statPosBriefs, "Total", $career.totals)
429:                 #else
430:                     #set ($careerTotals = $request.getAttribute("careerTotals"))
431:                     #set ($careerMap = $request.getAttribute("careerMap"))
432:                     #foreach ($season in $seasons)
433:                         ## Check if we did not get stats for this season
434:                         #if ($careerMap.get($season.seasonName))
435:                             #set ($label = "<a href='${season.path}?view=profile'>$season.seasonName</a>")
436:                             #splitWithLabels($statPosBriefs, $label, $careerMap[$season.seasonName])
437:                         #elseif ($wiki.valid())
438:                             <tr>
439:                                 <td scope="row" class="text-end">
440:                                     ${season.seasonName}
441:                                     <span class="d-inline-block" tabindex="0" data-bs-toggle="tooltip" data-bs-placement="right" title="We could not find the 'players' page in the ${season.seasonName} section.">
442:                                         <span class="fa fa-light fa-circle-info"></span>
443:                                     </span>
444:                                 </td>
445:                                 #foreach ( $i in [0..$tool.math.sub($statPosBriefs.size(), 1)])
446:                                     <td class="text-center">&nbsp;</td>
447:                                 #end
448:                             </tr>
449:                         #end
450:                     #end
451:                     #splitWithLabels($statPosBriefs, "Total", $request.getAttribute("careerTotals").overall)
452:                 #end
453:             </tbody>
454:         </table>
455:     </div> ## table-responsive
456: </div> ## stats-box
457: 
458: #end ## macro careerData
459: 
460: #macro (printGroupLabel $label $emptyColumnSize)
461:     <tr class="group table-active">
462:         <td><strong>$label</strong></td>
463:         #foreach ( $i in [1..$emptyColumnSize])
464:             <td></td>
465:         #end
466:     </tr>
467: #end
468: 
469: #macro (splitsData $p)
470: 
471: #set ($p = $positions.get($p))
472: #set ($statPosBriefs = $briefs.get($p))
473: 
474: #if ($statPosBriefs.size() > 0)
475: <div class="stats-box full clearfix">
476:     <div class="table-responsive-via-datatables">
477:         <table class="table table-hover nowrap w-100" data-searching="false" data-ordering="false" data-paging="false" data-info="false" data-filtering="false" data-scroll-y="50vh" data-module="theme-module/table-sort-bs">
478:             <thead class="thead-dark">
479:                 <tr>
480:                     <th></th>
481:                     #foreach ($brief in $statPosBriefs)
482:                         <th scope="col" class="text-center text-uppercase">$brief</th>
483:                     #end
484:                 </tr>
485:             </thead>
486: 
487:             <tbody>
488:                 #printGroupLabel("Event", $statPosBriefs.size())
489:                 #splitWithLabels($statPosBriefs, "Total", $splits.overall)
490:                 #splitWithLabels($statPosBriefs, "Conference", $splits.conference)
491:                 #splitWithLabels($statPosBriefs, "Exhibition", $splits.exhibition)
492: 
493:                 #printGroupLabel("Location", $statPosBriefs.size())
494:                 #splitWithLabels($statPosBriefs, "Home", $splits.home)
495:                 #splitWithLabels($statPosBriefs, "Away", $splits.away)
496:                 #splitWithLabels($statPosBriefs, "Neutral", $splits.neutral)
497: 
498:                 #printGroupLabel("Result", $statPosBriefs.size())
499:                 #foreach($gameResult in $gamesResults.entrySet())
500:                     #if ($gameResult.key == "wins")
501:                       #set ($splitGameResult = $splits.inWins)
502:                     #elseif ($gameResult.key == "losses")
503:                       #set ($splitGameResult = $splits.inLosses)
504:                     #elseif ($gameResult.key == "ties")
505:                       #set ($splitGameResult = $splits.inTies)
506:                     #end
507: 
508:                     #splitWithLabels($statPosBriefs, $gameResult.value, $splitGameResult)
509:                 #end
510: 
511: 
512:                 #if ($monthsPlayed and $monthsPlayed.size() > 0)
513: 
514:                     #printGroupLabel("Month", $statPosBriefs.size())
515: 
516:                     #foreach($month in $monthsPlayed)
517:                         #if ($month == 'January')
518:                           #set ($splitMonth = $splits.january)
519:                         #elseif ($month == 'February')
520:                           #set ($splitMonth = $splits.february)
521:                         #elseif ($month == 'March')
522:                           #set($splitMonth = $splits.march)
523:                         #elseif ($month == 'April')
524:                           #set($splitMonth = $splits.april)
525:                         #elseif ($month == 'May')
526:                           #set ($splitMonth = $splits.may)
527:                         #elseif ($month == 'June')
528:                           #set ($splitMonth = $splits.june)
529:                         #elseif ($month == 'July')
530:                           #set($splitMonth = $splits.july)
531:                         #elseif ($month == 'August')
532:                           #set ($splitMonth = $splits.august)
533:                         #elseif ($month == 'September')
534:                           #set($splitMonth = $splits.september)
535:                         #elseif ($month == 'October')
536:                           #set($splitMonth = $splits.october)
537:                         #elseif ($month == 'November')
538:                           #set ($splitMonth = $splits.november)
539:                         #elseif ($month == 'December')
540:                           #set($splitMonth = $splits.december)
541:                         #end
542: 
543:                         #splitWithLabels($statPosBriefs, $month, $splitMonth)
544:                     #end ## foreach
545:                 #end
546:             </tbody>
547:         </table>
548:     </div> ## table-responsive
549: </div> ## stats-box
550: #end
551: 
552: #end ## macro splitsData
553: 
554: #macro (printRecentGames)
555: #if ($hasEvents)
556:     <div class="table-responsive-via-datatables">
557:         <table class="table table-hover nowrap w-100" data-searching="false" data-ordering="false" data-paging="false" data-info="false" data-filtering="false" data-scroll-y="50vh" data-module="theme-module/table-sort-bs">
558:             <thead class="thead-dark">
559:                 <tr>
560:                     <th scope="col text-start">Date</th>
561:                     <th scope="col text-start">Opponent</th>
562:                     <th scope="col">Result</th>
563:                 </tr>
564:             </thead>
565:             <tbody>
566:                 #set ($eventEnd = -1)
567:                 #foreach ($event in $events)
568:                   #if ($event.event.result.resolved)
569:                     #set ($eventEnd = $velocityCount)
570:                   #end
571:                 #end
572: 
573:                 #set ($eventStart = $eventEnd - 5)
574:                 #if ($eventStart < 0) #set ($eventStart = 0) #end
575: 
576:                 #foreach ($event in $events)
577:                     #if ($velocityCount >= $eventStart and $velocityCount <= $eventEnd)
578:                         <tr>
579:                             <td scope="row" class="text-start">$formatter.formatDate($event.event.date, "MMM d")</td>
580:                             <td class="text-start">
581:                                 #if ($event.event.neutralSite.length() > 0) vs.
582:                                 #elseif (!$event.event.home) at
583:                                 #else ## nothing for a home game
584:                                 #end
585:                                 $event.event.opponent.name
586:                             </td>
587:                             <td>
588:                                 #if ($event.event.statusCode >= 0)
589:                                     #if ($event.event.eventId.length() > 0 && $event.stats.size() > 0)
590:                                         <a #printResultAriaLabel($event.event) href="../boxscores/${formatter.formatBoxScoreLink($event.event)}">${event.event.APResult}</a>
591:                                     #else
592:                                         ${event.event.APResult}
593:                                     #end
594:                                 #end
595:                             </td>
596:                         </tr>
597:                     #end ## if
598:                 #end
599:             </tbody>
600:         </table>
601:     </div>
602: #end
603: #end ## macro printRecentGames
604: 
605: #macro (printCategories $briefCategoryLabels $v $ariaLabel)
606:     <div class="$classTabPaneContent has-child-tabs">
607:         <div class="d-flex flex-row text-nowrap align-items-center justify-content-center">
608:             <div class="secondary-tab-select-container flex-fill">
609:                 <select class="tab-nav-select-helper form-select" id="bio-tabs-${v}-select" aria-label="Choose a stat group">
610:                     #foreach($briefCat in $briefCategoryLabels.entrySet())
611:                         #set ($briefCatLabel = $briefCat.value)
612:                         #set ($briefCatKey = $briefCat.key)
613:                         #if ($locale == "en_gb" && $briefCatLabel == "Defense")
614:                             #set ($briefCatLabel = "Defence")
615:                         #end
616:                         <option value="#${v}-tab-pos-${briefCatKey}-content" #if ($pos == $briefCat.key || $foreach.first) selected #end>${briefCatLabel}</option>
617:                     #end
618:                 </select>
619:                 <script>
620:                     $('.tab-nav-select-helper').on('change', function(e) {
621:                         var id = $(this).val();
622:                         $('a[data-bs-target="' + id + '"]').tab('show');
623:                     });
624:                 </script>
625:             </div>
626:         </div>
627:         <div class="$classBioTabChildrenWrapper" data-momentum="false">
628:             <ul class="$classBioTabChildren" id="bio-tabs-${v}" role="tablist">
629:                 #foreach($briefCat in $briefCategoryLabels.entrySet())
630:                     #set ($briefCatLabel = $briefCat.value)
631:                     #set ($briefCatKey = $briefCat.key)
632:                     #if ($locale == "en_gb" && $briefCatLabel == "Defense")
633:                         #set ($briefCatLabel = "Defence")
634:                     #end
635:                     <li class="nav-item flex-fill flex-md-grow-0 flex-md-shrink-0">
636:                         <a data-bs-toggle="tab" id="${v}-tab-pos-${briefCatKey}" class="nav-link#if ($activePos == $briefCatKey) active#end" data-bs-target="#${v}-tab-pos-${briefCatKey}-content" href="${page.url}?view=${v}&pos=${briefCatKey}" aria-label="${ariaLabel}: ${briefCatLabel}">${briefCatLabel}</a>
637:                     </li>
638:                 #end
639:             </ul>
640:         </div>
641:         <div class="tab-content py-3" id="${v}-tab-content">
642:             #foreach ($briefCat in $briefCategoryLabels.entrySet())
643:                 #set ($briefCatLabel = $briefCat.value)
644:                 #set ($briefCatKey = $briefCat.key)
645:                 #set ($class = "tab-panel")
646:                 #if ($briefCat.key == $activePos)
647:                    #set ($class = "tab-panel active show")
648:                 #end
649:                 <div class="tab-pane fade ${class}" id="${v}-tab-pos-${briefCatKey}-content" role="tabpanel" aria-labelledby="${v}-tab-pos-${briefCatKey}">
650:                     <div class="stats-wrap $classTabPaneContentChild">
651:                         #if ($v == "splits")
652:                             #splitsData($briefCat.key)
653:                         #elseif ($v == "career")
654:                             #careerData($briefCat.key)
655:                         #end
656:                         <caption><p class="text-muted small">$ariaLabel: $briefCatLabel</p></caption>
657:                     </div>
658:                 </div>
659:             #end
660:         </div>
661:     </div>
662: #end ## macro printCategories
663: 
664: #macro (printHeadshot $class)
665:     #if ($headshot.url)
666:         <img src="$headshot.url?max_width=510&max_height=600" class="$class" alt="$fullName" />
667:     #elseif ($options.get("roster_default_thumbnail").length() > 0)
668:         <span class="d-block" aria-hidden="true" style="background-image:url('$options.get("roster_default_thumbnail")'); background-position:center center; background-repeat:no-repeat; background-size:cover;"></span>
669:     #else
670:         <span class="d-flex align-items-center justify-content-center text-primary ps-img-placeholder-bg">
671:             <span class="fa-regular fa-image fa-xl opacity-1"></span>
672:         </span>
673:     #end
674: #end ## macro printHeadshot
675: 
676: #set ($socialBrands = ["facebook", "twitter", "instagram", "youtube", "twitch", "tiktok", "nil"])
677: 
678: #macro (buildSocialLink $brand $handle $icons $class)
679:     #if($brand == "facebook")
680:         #set($socialHost = "https://www.facebook.com")
681:     #elseif($brand == "twitter")
682:         #set($socialHost = "https://twitter.com")
683:     #elseif($brand == "instagram")
684:         #set($socialHost = "https://www.instagram.com")
685:     #elseif($brand == "tikTok")
686:         #set($socialHost = "https://www.tiktok.com")
687:     #elseif($brand == "tiktok")
688:         #set($socialHost = "https://www.tiktok.com")
689:     #elseif($brand == "twitch")
690:         #set($socialHost = "https://www.twitch.tv")
691:     #elseif($brand == "youtube")
692:         #set($socialHost = "https://www.youtube.com")
693:     #elseif($brand == "nil")
694:         #set($socialHost = "") ## We cannot define a host because the data entry can accept all NIL host services. Opendorse, Influencer, Fanatics, etc.
695:     #end
696: 
697:     #if($socialHost.length() > 0 )
698:         #set($url = "${socialHost}/${handle}")
699:     #elseif($brand == "nil")
700:         #set($url = "${handle}")
701:     #else
702:         #set($url = "")
703:     #end
704: 
705:     #set($icons = $Boolean.parseBoolean($icons))
706:     #if($icons == true)
707:         <a href="$url" class="$class" target="_blank"><span aria-label="$brand" class="#if($brand == 'nil')fa-kit #else fa fa-brands #end #if($brand == 'twitter') fa-x-twitter #else fa-$brand.toLowerCase() #end"></span></a>
708:     #else
709:         <a href="$url" class="$class" target="_blank">$handle</a>
710:     #end
711: #end
712: 
713: #macro(playerHeading)
714:     <div class="player-heading animated h3 bg-primary d-flex align-content-stretch text-white position-relative z-index-1 rounded-top overflow-hidden mb-0">
715:         #if ($!attributes.get("number").length() > 0)<span class="number bg-secondary inline-block text-white fs-2 lh-1 p-3">$!attributes.get("number")</span>#end
716:         <span class="name inline-block w-100 flex-grow-1 p-3">$fullName</span>
717:         <span class="social-handle-link inline-block p-3">
718:             <ul class="d-flex align-content-center h-100 gap-3 list-unstyled m-0">
719:                 #foreach ($field in $fields)
720:                     #if ($socialBrands.contains($field.key.toLowerCase()) && $attributes.get($field.key).length() > 0)
721:                         <li class="d-flex flex-column align-content-center justify-content-center">
722:                             #buildSocialLink($field.value.toLowerCase(), $!attributes.get($field.key), true, "btn btn-lg btn-link text-white p-0")
723:                         </li>
724:                     #end
725:                 #end
726:             </ul>
727:         </span>
728:     </div>
729:     <script>
730:         $(document).ready(function() {
731:             $('.player-heading.animated .name').addClass('visible');
732:             $('.player-heading.animated .number').addClass('visible');
733:         });
734:     </script>
735: 
736: #end
737: 
738: #macro (printBioInfo)
739:     #if ($enhancedLayout)
740:         #set ($classList = "d-flex flex-row flex-wrap justify-content-between row")
741:         #set ($classListItems = "col-12 col-lg-6 px-md-3")
742:         #set ($definitionListItems = "border-bottom m-0 p-2 p-lg-3 h-100")
743:     #else
744:         #set ($classList = "d-flex flex-column justify-content-start align-items-start")
745:         #set ($classListItems = "flex-grow-1 w-100 p-2 border-bottom")
746:         #set ($definitionListItems = " m-0 h-100 d-flex flex-column justify-content-start align-items-start")
747:     #end
748: 
749:     #if ($enhancedLayout)
750:         #playerHeading()
751:     #end
752:     <div class="container-fluid">
753:         <div class="roster-player-fields mt-3">
754:             <ul class="list-unstyled ${classList}">
755:                 #foreach ($i in [1..10])
756:                     #set ($stickyKey = "bio_custom${i}_sticky")
757:                     #if ($options.get($stickyKey).length() > 0 && $attributes.get("custom${i}").length() > 0)
758:                         <li class="$classListItems bio-field-custom-sticky">
759:                             <dl class="${definitionListItems}">
760:                                 <dt class="label p-0 me-2">$options.get($stickyKey): </dt>
761:                                 <dd class="value p-0 m-0 text-muted">$!attributes.get("custom${i}")</dd>
762:                             </dl>
763:                         </li>
764:                     #end
765:                 #end
766: 
767:                 #foreach ($field in $fields)
768:                     #if (!$field.key.startsWith("custom"))
769:                         #if ($attributes.get($field.key).length() > 0 && ($field.key != "first_name" && $field.key != "last_name" && $field.key != "number" && $field.key != "full_name"))
770:                             #if ($field.key == "phone1" || $field.key == "phone2")
771:                                 <li class="$classListItems bio-field-standard">
772:                                     <dl class="${definitionListItems}">
773:                                         <dt class="label p-0 me-2 d-inline">Phone: </dt>
774:                                         <dd class="value p-0 m-0 d-inline text-muted">$!attributes.get($field.key)</dd>
775:                                     </dl>
776:                                 </li>
777:                             #elseif ($field.key == "email_address")
778:                                 <li class="$classListItems bio-field-standard">
779:                                     <dl class="${definitionListItems}">
780:                                         #set ($emailAdd = $attributes.get($field.key))
781:                                         <dt class="label p-0 me-2 d-inline">Email: </dt>
782:                                         <dd class="value p-0 m-0 text-truncate d-inline text-muted"><a href="mailto:${emailAdd}">$emailAdd</a></dd>
783:                                     </dl>
784:                                 </li>
785:                             #elseif ($field.key == "weight_class")
786:                                 <li class="$classListItems bio-field-standard">
787:                                     <dl class="${definitionListItems}">
788:                                         <dt class="label p-0 me-2 d-inline">Class: </dt>
789:                                         <dd class="value p-0 m-0 d-inline text-muted">$!attributes.get($field.key)</dd>
790:                                     </dl>
791:                                 </li>
792:                             #elseif ($socialBrands.contains($field.value.toLowerCase()))
793:                                 <li class="$classListItems bio-field-standard">
794:                                     <dl class="${definitionListItems}">
795:                                         <dt class="label p-0 me-2 d-inline">$field.value: </dt>
796:                                         <dd class="value p-0 m-0  d-inline text-muted">#buildSocialLink($field.value.toLowerCase(), $!attributes.get($field.key), false, "")</dd>
797:                                     </dl>
798:                                 </li>
799:                             #elseif ($field.key != "position_abbr")
800:                                 <li class="$classListItems bio-field-standard">
801:                                     <dl class="${definitionListItems}">
802:                                         <dt class="label p-0 me-2 d-inline">$field.value: </dt>
803:                                         <dd class="value p-0 m-0  d-inline text-muted">$!attributes.get($field.key)</dd>
804:                                     </dl>
805:                                 </li>
806:                             #end
807:                         #end
808:                     #end
809:                 #end
810: 
811:                 #foreach ($i in [1..10])
812:                   #set ($customKey = "bio_custom${i}")
813:                   #if ($options.get($customKey).length() > 0 && $attributes.get("custom${i}"))
814:                     <li class="$classListItems bio-field-custom">
815:                         <dl class="${definitionListItems}">
816:                             <dt class="label p-0 me-2 d-inline">$options.get($customKey): </dt>
817:                             <dd class="value p-0 m-0 d-inline text-muted">$!attributes.get("custom${i}")</dd>
818:                         </dl>
819:                     </li>
820:                   #end
821:                 #end
822:             </ul>
823:         </div>
824:     </div>
825: #end ## macro printBioInfo
826: 
827: #macro (printActionShots)
828: #if ($showActionShots)
829:     ## FILTERS OUT THE NUMBER OF ACTION PHOTOS
830:     #set ($totalPhotoAvaiable = $playerPhotos.size())
831:     #set ($playerPhotosFiltered = $playerPhotos)
832:     #if ($actionShotsLimit < $totalPhotoAvaiable)
833:         #set ($playerPhotosFiltered = $playerPhotos.subList(0, $actionShotsLimit))
834:     #end
835:     #set ($playerPhotosFiltered = $tool.sorter.sort($playerPhotosFiltered, "lastUpdated:desc"))
836:     <div class="action-shots clearfix mb-md-n5 d-none d-sm-none d-md-block rounded">
837:         <div id="action-shots-carousel" class="carousel slide carousel-fade" data-bs-interval="12000" data-bs-ride="carousel">
838:             <ol class="carousel-indicators pb-sm-3 mb-sm-5">
839:                 #foreach($photo in $playerPhotosFiltered)
840:                     <li data-bs-target="#action-shots-carousel" data-bs-slide-to="$foreach.index" class="#if ($foreach.index == 0)active#end"></li>
841:                 #end
842:             </ol>
843:             <div class="carousel-inner ratio ratio-21x9">
844:                 #foreach($photo in $playerPhotosFiltered)
845:                     #set ($imgAlt = "Large featured action photo of $fullName - Image $foreach.count")
846:                     #if ($photo.altText.length() > 0)
847:                         #set ($imgAlt = $photo.altText)
848:                     #elseif( $photo.title.length() > 0 )
849:                         #set ($imgAlt = $photo.title)
850:                     #end
851:                     <div class="carousel-item#if ($foreach.index == 0) active#end">
852:                         <img src="${photo.url}?max_width=1200" alt="$imgAlt" class="d-block w-100" data-lastupdated="$photo.lastUpdated" />
853:                     </div>
854:                 #end
855:             </div>
856:         </div>
857:     </div>
858: #end
859: #end ## macro printActionShots
860: 
861: #macro (printHighlights)
862: #if ($highlights && $showHighlights)
863:     <div class="roster-bio-highlights bg-light bg-gradient text-dark bg-opacity-25 w-100 border rounded">
864:         <ul class="d-flex flex-row flex-wrap justify-content-between list-unstyled m-0">
865:             #foreach ($highlight in $highlights.keySet())
866:                 #set ($value = "-")
867:                 #set ($value = $formatter.formatNumber($stats.get($highlight), $formats.get($highlight)))
868:                 <li class="flex-fill text-center border-end">
869:                     <dl class="stat d-block m-0 p-3">
870:                         <dt class="d-block label p-0 m-0 text-uppercase fw-normal small">$!highlights.get($highlight)</dt>
871:                         <dd class="d-block value p-0 m-0 fs-4 fw-bold lh-1">$value</dd>
872:                     </dl>
873:                 </li>
874:             #end
875:         </ul>
876:     </div>
877: #end
878: #end ## macro printHighlights
879: 
880: #macro (printRoster)
881: #if ($enhancedLayout)
882:     $website.includeAgain("${page.url}?tmpl=roster-switcher-template&id=roster-list")
883: #else
884:     #set ($id = "roster-switcher")
885:     #if ($request.getParameter("id").length() > 0)
886:         #set ($id = $request.getParameter("id"))
887:     #end
888: 
889:     #if ($page.contentType == "loki/bio")
890:         #set ($headlinesFeaturedSize = 0)
891:         #foreach ($featuredPage in $page.headlinesFeatured)
892:             #if ($featuredPage.contentType == "loki/headlines")
893:                 #set ($headlinesFeaturedSize = $headlinesFeaturedSize + 1)
894:             #end
895:         #end
896:         #if ($headlinesFeaturedSize > 0)
897:             <div id="$id" class="float-md-end roster-switcher-template">
898:                 <div class="input-group">
899:                     <span class="input-group-text" id="${id-options}-group-text">Related Bios</span>
900:                     <select class="form-select" id="$id-options" aria-describedby="${id-options}-group-text" onchange="location=this.value;">
901:                         #set ($listItems = [])
902:                         #foreach ($featuredPage in $page.headlinesFeatured)
903:                             #if ($featuredPage.contentType == "loki/headlines")
904:                                 $website.includeAgain("${featuredPage.url}?tmpl=roster-list-template")
905:                                 #set ($headlines = $request.getAttribute("headlines"))
906:                                 #foreach ($bio in $headlines)
907:                                     #set ($b = $bio.getDataAsObject().getAttributes())
908:                                     #set ($fullName = "")
909:                                     #if ($b.get("full_name"))
910:                                         #set ($fullName = $b.get("full_name"))
911:                                     #else
912:                                         #if ($b.get("first_name") && $b.get("last_name"))
913:                                             #set ($firstName = $b.get("first_name"))
914:                                             #set ($lastName = $b.get("last_name"))
915:                                             #set ($fullName = "${firstName} ${lastName}")
916:                                         #end
917:                                     #end
918:                                     #if ($fullName.length() > 0)
919:                                         #if (!$listItems.contains($bio.url))
920:                                             #set($dummy = $listItems.add($bio.url))
921:                                             <option value="${bio.url}" data-url="${bio.url}" data-title="${fullName}" #if ($page.url == $bio.url)selected#end>${fullName}</option>
922:                                         #end
923:                                     #end
924:                                 #end
925:                             #end
926:                         #end
927:                     </select>
928:                 </div>
929:             </div>
930:         #end
931:     #elseif ($page.contentType == "loki/bio-network")
932:         #set ($relatedPlayers = $page.sectionPage.children)
933:         #set ($teamNames = {})
934:         #foreach ($relatedPlayer in $relatedPlayers)
935:             #if ($relatedPlayer.contentType == "loki/bio-network")
936:                 #set ($relatedPlayerObj = $relatedPlayer.getDataAsObject().getAttributes())
937:                 #set ($teamName = $relatedPlayerObj.get("team"))
938:                 #if ($teamName.length() > 0)
939:                     #if (!$teamNames.containsValue($teamName))
940:                         $!teamNames.put($tool.math.add($teamNames.size(), 1), $teamName)
941:                     #end
942:                 #end
943:             #end
944:         #end
945:         <div id="$id" class="float-md-end roster-switcher-template">
946:             <div class="input-group">
947:                 <span class="input-group-text" id="${id-options}-group-text">Related Bios</span>
948:                 <select class="form-select" id="$id-options" aria-describedby="${id-options}-group-text" onchange="location=this.value;">
949:                     #foreach ($i in [1..$teamNames.size()])
950:                         #if ($teamNames.size() > 1)
951:                             <optgroup label="$teamNames.get($i)">
952:                         #end
953: 
954:                         #foreach ($relatedPlayer in $relatedPlayers)
955:                             #if ($relatedPlayer.contentType == "loki/bio-network")
956:                                 #set ($relatedPlayerObj = $relatedPlayer.getDataAsObject().getAttributes())
957:                                 #set ($teamName = $relatedPlayerObj.get("team"))
958:                                 #if ($teamName.length() > 0 && $teamName == $teamNames.get($i))
959:                                     #set ($playerFirstName = $relatedPlayerObj.get("first_name"))
960:                                     #set ($playerLastName = $relatedPlayerObj.get("last_name"))
961:                                     <option value="$relatedPlayer.url" #if ($page.url == $relatedPlayer.url)selected#end>${playerFirstName} ${playerLastName}</option>
962:                                 #end
963:                             #end
964:                         #end
965: 
966:                         #if ($teamNames.size() > 1)
967:                             </optgroup>
968:                         #end
969:                     #end
970:                 </select>
971:             </div>
972:         </div>
973:     #end
974: #end ## enhancedLayout check
975: #end ## macro printRoster
976: 
977: ################################################## END MACROS  #############################################################
978: 
979: #if ($attributes.get("full_name").length() > 0)
980:   #set ($fullName = $attributes.get("full_name"))
981: #else
982:   #set ($firstName = $!attributes.get("first_name"))
983:   #set ($lastName = $!attributes.get("last_name"))
984:   #set ($fullName = "${firstName} ${lastName}")
985: #end
986: 
987: #set ($pageTitle = "")
988: #if($request.getAttribute("pageTitle").length() > 0)
989:         #set ($pageTitle = $request.getAttribute("pageTitle"))
990: #end
991: #if ($page.title.length() > 0)
992:         #set ($pageTitle = $!page.title)
993: #end
994: $!request.setAttribute("pageTitle", "${pageTitle}")
995: 
996: #set ($actionShots = false)
997: #if ($enhancedLayout && $playerPhotos.size() > 0)
998:   #set ($actionShots = true)
999: #end
1000: 
1001: #if ($enhancedLayout)
1002:     #set ($classRoot = "bio-enhanced")
1003:     #if ($actionShots && $showActionShots)
1004:           #set ($classRoot = "${classRoot} action")
1005:     #else
1006:           #set ($classRoot = "${classRoot} plain")
1007:     #end
1008:     #set ($flexClass = "d-flex flex-column align-items-stretch justify-content-start gap-4 w-100 gap-4")
1009:     #set ($bioCardClass = "col-auto")
1010:     #set ($classBody = "flex-grow-1")
1011:     #set ($classBioTabParentsWrapper = "nav-tabs-wrapper position-relative pt-3")
1012:     #set ($classBioTabParents = "nav nav-tabs nav-tabs-responsive d-flex with-arrow lined flex-row text-nowrap justify-content-center gap-3")
1013:     #set ($classBioTabChildrenWrapper = "nav-tabs-wrapper position-relative py-3 border-bottom d-none")
1014:     #set ($classBioTabChildren = "nav nav-tabs nav-tabs-responsive d-flex with-arrow lined flex-row text-nowrap justify-content-center gap-3")
1015:     #set ($classTabPaneContent = "tab-pane-contents p-3 border")
1016:     #set ($classTabPaneContentChild = "tab-pane-contents p-0")
1017: #else
1018:     #set ($classRoot = "bio-wrap ")
1019:     #set ($flexClass = "d-flex flex-column align-items-stretch justify-content-start flex-md-row gap-4")
1020:     #set ($bioContainerClass = "mt")
1021:     #set ($bioCardClass = "min-width-300px max-width-md-300px")
1022:     #set ($classBody = "flex-grow-1 overflow-hidden")
1023:     #set ($classBioTabParentsWrapper = "nav-tabs-wrapper position-relative tab-nav")
1024:     #set ($classBioTabParents = "nav nav-tabs nav-tabs-responsive d-flex with-arrow lined flex-row text-nowrap justify-content-center gap-3")
1025:     #set ($classBioTabChildrenWrapper = "nav-tabs-wrapper position-relative tab-nav d-none")
1026:     #set ($classBioTabChildren = "nav nav-tabs nav-tabs-responsive d-flex with-arrow lined flex-row text-nowrap justify-content-center gap-3")
1027:     #set ($classTabPaneContent = "tab-pane-contents p-3 border")
1028:     #set ($classTabPaneContentChild = "tab-pane-contents p-0")
1029: 
1030: #end
1031: 
1032: ## FULL ROSTER
1033: <div class="bio-template ${classRoot} #if ($highlights) bio-wrap-has-highlights #end d-flex flex-column align-items-stretch justify-content-start gap-4">
1034: 
1035:     ## RELATED BIOS
1036:     #if ($showRoster)
1037:         <div class="container-fluid">
1038:             <div class="related-bios">#printRoster()</div>
1039:         </div>
1040:     #end
1041: 
1042:     #if ($actionShots)
1043:       #printActionShots()
1044:     #end
1045: 
1046:     #if ($enhancedLayout)
1047:     #else
1048:         #playerHeading()
1049:     #end
1050: 
1051: <div class="roster-bio-container">
1052:     <div class="${flexClass}">
1053:         <div class="bio-card ${bioCardClass}">
1054:             <div class="player-about clearfix">
1055:                 #if ($enhancedLayout)
1056:                     <div class="bio-card-enhanced d-flex flex-column flex-md-row align-items-stretch align-items-md-start justify-content-center justify-content-md-start  gap-3">
1057:                         <div class="bcs-image flex-shrink-1 flex-grow-1 min-width-300px max-width-md-300px">
1058:                             <div class="player-headshot text-center position-relative z-index-1 #if($actionShots)mt-md-n5 #end shadow rounded border overflow-hidden ratio ratio-3x4">
1059:                                 #printHeadshot("img-fluid img-thumbnail")
1060:                             </div>
1061:                         </div>
1062:                         <div class="flex-grow-1">
1063:                             <div class="player-info">#printBioInfo()</div>
1064:                             <div class="container-fluid">
1065:                                 <div class="mt-3 mx-3 mt-lg-4 ">
1066:                                     #printHighlights()
1067:                                 </div>
1068:                             </div>
1069:                         </div>
1070:                     </div>
1071:                 #else
1072:                     <div class="bio-card-standard d-flex flex-column align-items-stretch justify-content-start gap-3">
1073:                         <div class="bcs-image flex-shrink-1 min-width-300px max-width-md-300px">
1074:                             <div class="player-headshot text-center position-relative z-index-1 mb-3 shadow rounded border overflow-hidden ratio ratio-3x4">
1075:                                 #printHeadshot("img-fluid img-thumbnail")
1076:                             </div>
1077:                         </div>
1078:                         <div class="bcs-attributes">
1079:                             <div class="player-info">#printBioInfo()</div>
1080:                         </div>
1081:                     </div>
1082:                 #end
1083:             </div>
1084:         </div> ## bio-card
1085: 
1086:         #if ($view.length() > 0)
1087:             $request.setAttribute("icl-responsive-tabs-script", true)
1088: 
1089:             <div class="bio-body ${classBody}">
1090: 
1091:                 <div class="d-flex flex-column align-items-center justify-content-start gap-3">
1092:                     #if (!$enhancedLayout) #printHighlights #end
1093:                     <div class="tab-container w-100">
1094:                         #if ($statsURL.length() > 0 || $hasHTMLStats || $releases.size() > 0|| $playerPhotos.size() > 0 || $playerVideos.size() > 0)
1095:                             <div class="$classBioTabParentsWrapper">
1096:                                 <ul class="$classBioTabParents" id="bio-tabs-parents" role="tablist">
1097:                                     #if ($hasSynopsis || $hasBioBrief)
1098:                                         <li class="nav-item">
1099:                                             <a data-bs-toggle="tab" id="bio-tab" class="nav-link #if ($view == "bio") active#end" data-bs-target="#bio" href="${page.url}?view=bio">Bio</a>
1100:                                         </li>
1101:                                     #end
1102: 
1103:                                     #if ($statsURL.length() > 0)
1104:                                         <li class="nav-item">
1105:                                             <a data-bs-toggle="tab" id="profile-tab" class="nav-link#if ($view == "profile") active#end" data-bs-target="#profile" href="${page.url}?view=profile">Player Profile</a>
1106:                                         </li>
1107:                                         <li class="nav-item">
1108:                                             <a data-bs-toggle="tab" id="gamelog-tab" class="nav-link#if ($view == "gamelog") active#end" data-bs-target="#gamelog" href="${page.url}?view=gamelog">Game Log</a>
1109:                                         </li>
1110:                                         #if ($showCareer)
1111:                                             <li class="nav-item">
1112:                                                 <a data-bs-toggle="tab" id="career-tab" class="nav-link#if ($view == "career") active#end" data-bs-target="#career" href="${page.url}?view=career">Career Stats</a>
1113:                                             </li>
1114:                                         #end
1115:                                         <li class="nav-item">
1116:                                             <a data-bs-toggle="tab" id="splits-tab" class="nav-link#if ($view == "splits") active#end" data-bs-target="#splits" href="${page.url}?view=splits">Split Stats</a>
1117:                                         </li>
1118:                                     #end
1119: 
1120:                                     #if ($hasHTMLStats)
1121:                                         <li class="nav-item">
1122:                                             <a data-bs-toggle="tab" id="htmlstats-tab" class="nav-link#if ($view == "htmlstats") active#end" data-bs-target="#htmlstats" href="${page.url}?view=htmlstats">HTML Stats</a>
1123:                                         </li>
1124:                                     #end
1125: 
1126:                                     #if ($releases.size() > 0)
1127:                                         <li class="nav-item">
1128:                                             <a data-bs-toggle="tab" id="news-tab" class="nav-link#if ($view == "news") active#end" data-bs-target="#news" href="${page.url}?view=news">News</a>
1129:                                         </li>
1130:                                     #end
1131: 
1132:                                     #if ($playerPhotos.size() > 0)
1133:                                         <li class="nav-item">
1134:                                             <a data-bs-toggle="tab" id="photos-tab" class="nav-link#if ($view == "photos") active#end" data-bs-target="#photos" href="${page.url}?view=photos">Photos</a>
1135:                                         </li>
1136:                                     #end
1137: 
1138:                                     #if ($playerVideos.size() > 0)
1139:                                         <li class="nav-item">
1140:                                             <a data-bs-toggle="tab" id="videos-tab" class="nav-link#if ($view == "videos") active#end" data-bs-target="#videos" href="${page.url}?view=videos">Videos</a>
1141:                                         </li>
1142:                                     #end
1143: 
1144:                                     ## WEPLAYED MOMENTS - THIRD-PARTY SUPPORT PLUGIN
1145:                                     #if (!$page.url.contains("/coaches") && $options.get("weplayed_addon_code"))
1146:                                         <li class="nav-item weplayed-hide-no-data #if ($view == "weplayed") active#end">
1147:                                             <a data-toggle="tab" id="weplayed-tab" class="nav-link#if ($view == "weplayed") active#end" data-target="#weplayed" href="${page.url}?view=weplayed">#Moments</a>
1148:                                         </li>
1149:                                     #end
1150:                                 </ul>
1151:                             </div>
1152:                         #end
1153:                         <div class="tab-content py-3" id="roster-tab-content">
1154:                             ## BIO
1155:                             #if ($hasSynopsis || $hasBioBrief)
1156:                                 #set ($class = "tab-panel")
1157:                                 #if ($view == "bio")
1158:                                    #set ($class = "tab-panel active show")
1159:                                 #end
1160: 
1161:                                 <div class="tab-pane fade ${class}" id="bio" role="tabpanel" aria-labelledby="bio-tab">
1162:                                     <div class="$classTabPaneContent synopsis">
1163:                                         <h5 class="bio-tabbed-content-heading">Bio</h5>
1164:                                         #if ($hasSynopsis)
1165:                                           $synopsis
1166:                                         #elseif ($hasBioBrief)
1167:                                           $website.include("$bioBriefURL")
1168:                                         #end
1169:                                     </div>
1170:                                 </div> ## tab-panel
1171:                             #end
1172: 
1173:                             ## STATS
1174:                             #if ($statsURL.length() > 0)
1175: 
1176:                                 ## PROFILE
1177:                                 #set ($class = "tab-panel")
1178:                                 #if ($view == "profile")
1179:                                    #set ($class = "tab-panel active show")
1180:                                 #end
1181: 
1182:                                 <div class="tab-pane fade ${class}" id="profile" role="tabpanel" aria-labelledby="profile-tab">
1183:                                     <div class="$classTabPaneContent stats-wrap">
1184:                                         <div class="d-flex flex-column flex-md-row align-items-top justify-content-center gap-3">
1185:                                             <div class="season-stats-overview flex-grow-1 flex-shrink-1 col-12 col-md-6">
1186:                                                 <div class="container-fluid p-0">
1187:                                                     <div class="bio-tabbed-content-heading h5">Player statistics</div>
1188:                                                     ## RANKING
1189:                                                     <div class="stats-box mb-3">
1190:                                                         #if ($statPos.length() > 0)
1191:                                                             $website.include("players?tmpl=stats-bios-rank-template&rank=${playerId}&pos=${statPos}")
1192:                                                         #end
1193:                                                     </div>
1194:                                                 </div>
1195:                                             </div>
1196: 
1197:                                             ## LAST SIX GAMES
1198:                                             <div class="recent-games-list flex-grow-1 flex-shrink-1 col-12 col-md-6">
1199:                                                 <div class="container-fluid p-0">
1200:                                                     <div class="bio-tabbed-content-heading h5">Recent results</div>
1201:                                                     <div class="stats-box mb-3">
1202:                                                         #printRecentGames()
1203:                                                     </div>
1204:                                                 </div>
1205:                                             </div>
1206: 
1207:                                         </div>
1208:                                     </div> ## stats-wrap
1209:                                 </div> ## tab-content
1210: 
1211:                                 ## GAMELOG
1212:                                 #set ($class = "tab-panel")
1213:                                 #if ($view == "gamelog")
1214:                                    #set ($class = "tab-panel active show")
1215:                                 #end
1216: 
1217:                                 #set ($activePos = $statPos)
1218:                                 #if ($view == "gamelog" && $paramPos.length() > 0)
1219:                                     #if ($positions.get($paramPos).length() > 0)
1220:                                         #set ($activePos = $positions.get($paramPos))
1221:                                     #end
1222:                                 #end
1223: 
1224:                                 <div class="tab-pane fade ${class}" id="gamelog" role="tabpanel" aria-labelledby="gamelog-tab">
1225:                                     #if ($gamelogsCategoriesLabels)
1226:                                         <div class="$classTabPaneContent has-child-tabs">
1227:                                             <div class="d-flex flex-row text-nowrap align-items-center justify-content-center">
1228:                                                 <div class="secondary-tab-select-container flex-fill">
1229:                                                     <select class="tab-nav-select-helper form-select" id="bio-tabs-gamelog-select" aria-label="Choose a stat group">
1230:                                                         #foreach($briefCat in $gamelogsCategoriesLabels.entrySet())
1231:                                                             #set ($briefCatLabel = $briefCat.value)
1232:                                                             #set ($briefCatKey = $briefCat.key)
1233:                                                             #if ($locale == "en_gb" && $briefCatLabel == "Defense")
1234:                                                                 #set ($briefCatLabel = "Defence")
1235:                                                             #end
1236:                                                             <option value="#gamelog-tab-pos-${briefCatKey}-content" #if ($pos == $briefCat.key || $foreach.first) selected #end>${briefCatLabel}</option>
1237:                                                         #end
1238:                                                     </select>
1239:                                                     <script>
1240:                                                         $('.tab-nav-select-helper').on('change', function(e) {
1241:                                                             var id = $(this).val();
1242:                                                             $('a[data-bs-target="' + id + '"]').tab('show');
1243:                                                         });
1244:                                                     </script>
1245:                                                 </div>
1246:                                             </div>
1247:                                             <div class="$classBioTabChildrenWrapper" data-momentum="false">
1248:                                                 <ul class="$classBioTabChildren" id="bio-tabs-gamelog" role="tablist">
1249:                                                     #foreach($gamelogsCatLabel in $gamelogsCategoriesLabels.entrySet())
1250:                                                         #set($gamelogsCatLabelVal = $gamelogsCatLabel.value)
1251:                                                         #set ($gamelogsCatLabelKey = $gamelogsCatLabel.key)
1252:                                                         #if ($locale == "en_gb" && $gamelogsCatLabelVal == "Defense")
1253:                                                             #set($gamelogsCatLabelVal = "Defence")
1254:                                                         #end
1255:                                                         <li class="nav-item flex-fill flex-md-grow-0 flex-md-shrink-0">
1256:                                                             <a data-bs-toggle="tab" id="gamelog-tab-pos-${gamelogsCatLabel.key}" class="nav-link#if ($activePos == $gamelogsCatLabel.key) active#end" data-bs-target="#gamelog-tab-pos-${gamelogsCatLabel.key}-content" href="${page.url}?view=gamelog&pos=${gamelogsCatLabel.key}" aria-label="Game Log: ${gamelogsCatLabelVal}">$gamelogsCatLabelVal</a>
1257:                                                         </li>
1258:                                                     #end
1259:                                                 </ul>
1260:                                             </div>
1261:                                             <div class="tab-content py-3" id="gamelog-tab-content">
1262:                                                 #foreach($gamelogsCatLabel in $gamelogsCategoriesLabels.entrySet())
1263:                                                     #set ($class = "tab-panel")
1264:                                                     #if ($gamelogsCatLabel.key == $activePos)
1265:                                                        #set ($class = "tab-panel active show")
1266:                                                     #end
1267:                                                     <div class="tab-pane fade ${class}" id="gamelog-tab-pos-${gamelogsCatLabel.key}-content" role="tabpanel" aria-labelledby="gamelog-tab-pos-${gamelogsCatLabel.key}">
1268:                                                         <div class="stats-wrap $classTabPaneContentChild">
1269:                                                              <h5 class="bio-tabbed-content-heading visually-hidden">Game Log - <small class="text-muted"> $gamelogsCatLabel.value</small></h5></h4>
1270:                                                             #gamelogData($gamelogsCatLabel.key)
1271:                                                         </div>
1272:                                                     </div>
1273:                                                 #end
1274:                                             </div>
1275:                                         </div>
1276:                                     #else
1277:                                         <div class="stats-wrap $classTabPaneContent">#gamelogData($pos)</div>
1278:                                     #end
1279: 
1280:                                 </div> ## tab-panel
1281: 
1282:                                 ## CAREER
1283:                                 #if ($showCareer)
1284: 
1285:                                     #set ($activePos = $statPos)
1286:                                     #if ($view == "career" && $paramPos.length() > 0)
1287:                                         #if ($positions.get($paramPos).length() > 0)
1288:                                             #set ($activePos = $positions.get($paramPos))
1289:                                         #end
1290:                                     #end
1291: 
1292:                                     #set ($class = "tab-panel")
1293:                                     #if ($view == "career")
1294:                                        #set ($class = "tab-panel active show")
1295:                                     #end
1296: 
1297:                                     <div class="tab-pane fade ${class}" id="career" role="tabpanel" aria-labelledby="career-tab">
1298:                                         #if ($briefsCategoriesLabels)
1299:                                             #printCategories($briefsCategoriesLabels "career" "Career Stats")
1300:                                         #else
1301:                                             <div class="stats-wrap $classTabPaneContent">#careerData($activePos)</div>
1302:                                         #end
1303:                                     </div>
1304:                                 #end
1305: 
1306:                                 ## SPLITS
1307:                                 #set ($class = "tab-panel clearfix")
1308:                                 #if ($view == "splits")
1309:                                    #set ($class = "tab-panel active show")
1310:                                 #end
1311: 
1312:                                 #set ($activePos = $statPos)
1313:                                 #if ($view == "splits" && $paramPos.length() > 0)
1314:                                     #if ($positions.get($paramPos).length() > 0)
1315:                                         #set ($activePos = $positions.get($paramPos))
1316:                                     #end
1317:                                 #end
1318: 
1319:                                 <div class="tab-pane fade ${class}" id="splits" role="tabpanel" aria-labelledby="splits-tab">
1320:                                     #if ($briefsCategoriesLabels)
1321:                                         #printCategories($briefsCategoriesLabels "splits" "Splits Stats")
1322:                                     #else
1323:                                         <div class="stats-wrap $classTabPaneContent">#splitsData($pos)</div>
1324:                                     #end
1325:                                 </div>
1326:                             #end
1327: 
1328:                             ## HTML STATS
1329:                             #if ($hasHTMLStats)
1330:                                 #set ($class = "tab-panel clearfix")
1331:                                 #if ($view == "htmlstats")
1332:                                    #set ($class = "tab-panel active show")
1333:                                 #end
1334:                                 <div class="tab-pane fade ${class}" id="htmlstats" role="tabpanel" aria-labelledby="htmlstats-tab">
1335:                                     <div class="$classTabPaneContent">
1336:                                         <h5 class="bio-tabbed-content-heading">Other Stats</h5>
1337:                                         <a href="${htmlStatsURL}" class="bio-htmlstats-identifier">Click to view HTML Stats</a>
1338:                                     </div>
1339:                                 </div>
1340:                             #end
1341: 
1342:                             ## NEWS
1343:                             #if ($releases.size() > 0)
1344:                                 #set ($class = "tab-panel clearfix")
1345:                                 #if ($view == "news")
1346:                                    #set ($class = "tab-panel active show")
1347:                                 #end
1348:                                 <div class="tab-pane fade ${class}" id="news" role="tabpanel" aria-labelledby="news-tab">
1349:                                     <div class="$classTabPaneContent">
1350:                                         <h5 class="bio-tabbed-content-heading">News mentions</h5>
1351:                                         #printReleases($releases, "article")
1352:                                     </div>
1353:                                 </div>
1354:                             #end
1355: 
1356:                             ## PHOTOS
1357:                             #if ($playerPhotos.size() > 0)
1358:                                 #set ($class = "tab-panel clearfix")
1359:                                 #if ($view == "photos")
1360:                                     #set ($class = "tab-panel active show clearfix")
1361:                                 #end
1362:                                 <div class="tab-pane fade ${class}" id="photos" role="tabpanel" aria-labelledby="photos-tab">
1363:                                     <div class="$classTabPaneContent">
1364:                                         <h5 class="bio-tabbed-content-heading">Photos</h5>
1365:                                         $website.includeAgain("${page.url}?tmpl=bio-photos-template")
1366:                                     </div>
1367:                                 </div>
1368:                             #end
1369: 
1370:                             ## VIDEOS
1371:                             #if ($playerVideos.size() > 0)
1372:                                 #set ($class = "tab-panel clearfix")
1373:                                 #if ($view == "videos")
1374:                                     #set ($class = "tab-panel active show clearfix")
1375:                                 #end
1376:                                 <div class="tab-pane fade ${class}" id="videos" role="tabpanel" aria-labelledby="videos-tab">
1377:                                     <div class="$classTabPaneContent">
1378:                                         <h5 class="bio-tabbed-content-heading">Videos</h5>
1379:                                         #printReleases($playerVideos, "video")
1380:                                     </div>
1381:                                 </div>
1382:                             #end
1383: 
1384:                             ## WEPLAYED MOMENTS - THIRD-PARTY SUPPORT PLUGIN
1385:                             #if (!$page.url.contains("/coaches") && $options.get("weplayed_addon_code"))
1386:                                 #set ($class = "tab-panel clearfix")
1387:                                 #if ($view == "weplayed")
1388:                                     #set ($class = "tab-panel active show clearfix")
1389:                                 #end
1390:                                 <div class="tab-pane fade ${class} weplayed-hide-no-data" id="weplayed-tab" role="tabpanel" aria-labelledby="weplayed-tab">
1391:                                     <div class="$classTabPaneContent">
1392:                                         <div data-weplayed-widget></div>
1393:                                     </div>
1394:                                 </div>
1395:                             #end
1396: 
1397:                         </div> ## tab-panels
1398:                     </div> ## tab-container
1399:                 </div>
1400:             </div> ## body
1401:         #end
1402:     </div>
1403: </div>
1404: 
1405: $wiki
1406: </div> ## ends bio-wrap
1407: 
1408: ## GLOBAL ADS SERVER
1409: #if ($website.ads.isAdvertisingEnabled('BIOS'))
1410:     $website.includeAgain("global-adserver-slots?adSlot=bios")
1411: #end
1412: