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