2017 Men's Lacrosse Roster

There was a problem with a Velocity script
Pageheadlines-template
ErrorInvocation of method 'sortedBy' in class com.prestosports.content.HeadlinesSorter threw exception Only one : should be in a sort rule (hometown:/:custom1) at headlines-template[line 151, column 37]
Page source:
1: ## PICK UP OPTIONS
2: $website.include("options")
3: #set ($options = $request.getAttribute("options"))
4: 
5: #if ($restriction.code == 2)
6: ## IMAGES (PHOTO GALLERY)
7: 
8:   $website.includeAgain("${page.url}?tmpl=photo-gallery-template")
9: 
10: #elseif ($restriction.code == 3)
11: ## Bios (roster)
12: 
13: #macro (printHeadshot $bioinfo)
14: 	#set ($bio = $bioinfo.getDataAsObject().getAttributes())
15: 	#set ($alt = "${bio.get('first_name')} ${bio.get('last_name')} full bio")
16: 	
17: 	
18:     #if ($bioinfo.publishedHeadshots.size() > 0)
19:     	#set ($src = $bioinfo.publishedHeadshots.get(0).url)
20:     #else
21:     	#if ($website.exists("/images/setup/headshot_default.jpg"))
22: 			#set ($src = "/images/setup/headshot_default.jpg")
23:     	#else
24: 			#set ($src = "/info/images/default_headshot.jpg")
25:     	#end
26: 	#end
27: 	
28: 	<img src="${src}?max_width=300" alt="$alt" class="headshot" />
29: #end ## macro printHeadshot
30: 
31: #set ($rosterLayout = "list")
32: #set ($showHeadshotView = false)
33: 
34: #if ($options.get("roster_show_headshot_view") == true && !($browser.getIphone() || $browser.getMobile()))
35: 	#set ($showHeadshotView = true)
36: 	
37:     #foreach ($cookie in $request.cookies)
38:         #if ($cookie.name == "roster_view")
39:         	#set ($rosterLayout = $cookie.value)
40:         #end
41:     #end	
42: #end
43: 
44: #if ($options.get("roster_default_view"))
45:   #set ($rosterLayout = $options.get("roster_default_view"))
46: #end
47: 
48: #if ($request.getParameter("view"))
49:   #set ($view = $request.getParameter("view"))
50:   #if ($view == "list" || $view == "headshot")
51:     #set ($rosterLayout = $view)
52:   #end
53: #end
54: 
55: #if ($request.getParameter("sort").length() > 0) ## when sort param is available, force the list layout
56:   #set ($rosterLayout = "list")
57: #end  
58:   
59: <div class="mod-roster">
60: 
61: #if ($options.get("archive_roster"))
62: 	#set ($archiveRosterString = $options.get("archive_roster"))
63: 	#set ($archiveRosterString = $archiveRosterString.split(","))
64: 	#set ($isArchivePage = false)
65: 	#if ($tool.list.size($archiveRosterString) > 0)
66: 		<div class="roster-archive clearfix">
67: 		<select title="Archive Rosters">
68: 			<option selected="selected">Archive Rosters</option>
69: 			#foreach ($string in $archiveRosterString)
70: 				#set ($archiveRoster = $string.split(":"))
71: 				#if ($tool.list.size($archiveRoster) == 2)
72: 					#set ($archiveUrl = $tool.list.get($archiveRoster, 0).trim())
73: 					#set ($archiveLabel = $tool.list.get($archiveRoster, 1).trim())
74: 					#if ($archiveUrl != $page.url)
75: 						<option value="$archiveUrl">$archiveLabel</option>
76: 					#else
77: 						#set ($isArchivePage = true)
78: 					#end
79: 				#end
80: 			#end
81: 		</select>
82: 		</div>
83: 		<script>
84:     (function($) {
85: 			$(function() {
86: 				$('.roster-archive select').change(function() {
87: 					window.location.href = $(this).val();
88: 				});
89: 			});
90:     })(jQuery);
91: 		</script>
92: 	#end
93: #end
94: 
95: <div class="align-center">
96: 	#if ($page.thumbnailURL)
97: 		#set ($rosterThumbSize = 600)
98:         #if ($tool.math.toInteger($options.get("roster_thumb_size")))
99:           #set ($rosterThumbSize = $tool.math.toInteger($options.get("roster_thumb_size")))
100:         #end
101: 		<div class="banner-img">
102: 			<img src="$page.thumbnailURL?max_width=${rosterThumbSize}" alt="page.thumbnailPage.altText" width="${rosterThumbSize}" />
103: 		</div>
104: 	#end
105: 	#if ($showHeadshotView)
106:     <div class="toggle-buttons">
107:       <ul class="clearfix">
108:         <li #if ($rosterLayout == "list") class="list active" #else class="list" #end>
109: 			<a href="${page.url}?view=list" class="btn"><span class="icon gicon-menu"></span></a>
110: 		</li>
111:         <li #if ($rosterLayout == "headshot") class="headshot active" #else class="headshot" #end>
112: 			<a href="${page.url}?view=headshot" class="btn"><span class="icon gicon-headshot"></span></a>
113: 		</li>
114:       </ul>
115:     </div>
116: 	#end
117: 	#if ($page.title.length() > 0)
118: 		<h1>$page.title</h1>
119: 	#end
120: </div>
121: 
122: #if ($rosterLayout == "list")
123: 	#set ($rosterFields = ["number","first_name: :last_name","position","year","height","weight","hometown:/:highschool"])
124: 	#set ($rosterLabels = ["No.","Name","Pos.","Cl.","Ht.","Wt.","Hometown/High School"])
125: 	#set ($rosterSortables = ["number","last_name","year","position"])
126: 	
127: 	#if ($options.get("roster_fields") && $options.get("roster_labels"))
128:         #set ($rosterFieldsString = $options.get("roster_fields"))
129:         #set ($rosterLabelsString = $options.get("roster_labels"))
130:         
131: 		#set ($rosterFieldsString = $rosterFieldsString.split(","))
132:         #set ($rosterLabelsString = $rosterLabelsString.split(","))
133: 		
134: 		#set ($rosterFieldsSize = $tool.list.size($rosterFieldsString))
135: 		#set ($rosterLabelsSize = $tool.list.size($rosterLabelsString))
136: 
137: 		#if ($rosterFieldsSize > 0 && $rosterLabelsSize > 0 && $rosterFieldsSize == $rosterLabelsSize)
138: 			#set ($rosterFields = $rosterFieldsString)
139: 			#set ($rosterLabels = $rosterLabelsString)
140: 		#end
141: 	#end
142: 	
143: 	#if ($options.get("roster_sortable"))
144: 		#set ($rosterSortablesString = $options.get("roster_sortable"))
145: 		#set ($rosterSortables = $rosterSortablesString.split(","))
146: 	#end
147:     
148:     #set ($sortBy = "")
149:     #set($sortBy = $formatter.escapeXml($request.getParameter("sort")))
150:     #if ($sortBy.length() > 0)
151:       #set ($headlines = $headlines.sortedBy($sortBy))
152:     #end
153:     
154:     <div class="roster">
155:     	<table>
156:     		<thead>
157:     			<tr class="roster-header accent-bg">
158:     				##PRINTING LABELS
159:     				#foreach($field in $rosterFields)
160:     					#set ($fieldLabel = $tool.list.get($rosterLabels, $tool.math.sub($velocityCount, 1)))
161:     					#set ($isSortable = false)
162:     					#set ($sortableField = "")
163:     					
164:     					#if ($tool.list.size($rosterSortables) > 0)
165:     						#foreach ($sortable in $rosterSortables)
166:     							#if ($field.contains($sortable))
167:     								#set ($isSortable = true)
168:     								#set ($sortableField = $sortable)
169:     							#end
170:     						#end
171:     					#end
172:     					
173:     					<td class="col${velocityCount}">
174:     						#if ($isSortable)
175:     							<a href="$page.url?sort=${sortableField}" title="Sort using this column" class="sortable">$fieldLabel</a>
176:     						#else
177:     							$fieldLabel
178:     						#end
179:     					</td>
180:     				#end
181:     			</tr>
182:     		</thead>
183:     		<tbody>
184:     			#set ($row = $formatter.makeAlternator("row", "0", "1"))
185:     			#foreach ($bioinfo in $headlines)
186:     				#set ($bio = $bioinfo.getDataAsObject().getAttributes())
187:     				<tr class="roster-row${row}">
188:     				    <td class="headshot">
189: 							<a href="$bioinfo.url">#printHeadshot($bioinfo)</a>
190:     				    </td>
191:     				    
192:     					#foreach($field in $rosterFields)
193:     						#set ($fieldValue = "")
194:     						#if ($field.contains(": :"))
195:     							#set ($fieldParts = $field.split(": :"))
196:     							#foreach ($fieldPart in $fieldParts)
197:     								#set ($fieldPartValue = "")
198:     								#if ($fieldPart.contains(">"))
199:     									#set ($orderedFields = $fieldPart.split(">"))
200:     									#foreach ($orderedField in $orderedFields)
201:     										#set ($orderedField = $orderedField.trim())
202:     										#if ($bio.get($orderedField) && $fieldPartValue.length() == 0)
203:     											#set ($fieldPartValue = $bio.get($orderedField))
204:     										#end
205:     									#end
206:     								#else
207:     									#if ($bio.get($fieldPart))
208:     										#set ($fieldPartValue = $bio.get($fieldPart))
209:     									#end
210:     								#end
211:     								#if ($fieldPartValue.length() > 0)
212: 	    								#set ($fieldValue = "${fieldValue} ${fieldPartValue}")
213: 	    							#end
214:     							#end
215:     						#elseif ($field.contains(":/:"))
216:     							#set ($fieldParts = $field.split(":/:"))
217:     							#foreach ($fieldPart in $fieldParts)
218:     								#set ($fieldPart = $fieldPart.trim())
219:     								#set ($fieldPartValue = "-")
220:     							
221:     								#if ($fieldPart.contains(">"))
222:     									#set ($orderedFields = $fieldPart.split(">"))
223:     									#foreach ($orderedField in $orderedFields)
224:     										#set ($orderedField = $orderedField.trim())
225:     										#if ($bio.get($orderedField) && $fieldPartValue == "-")
226:     											#set ($fieldPartValue = $bio.get($orderedField))
227:     										#end
228:     									#end
229:     								#else
230:     									#if ($bio.get($fieldPart))
231:     										#set ($fieldPartValue = $bio.get($fieldPart))
232:     									#end
233:     								#end
234:     								
235:     								#if ($velocityCount > 1)
236:     									#set ($fieldValue = "${fieldValue} / $fieldPartValue")
237:     								#else
238:     									#set ($fieldValue = $fieldPartValue)
239:     								#end
240:     								
241:     							#end
242:     						#else
243:     							#if ($field.contains(">"))
244:     								#set ($orderedFields = $field.split(">"))
245:     								#foreach ($orderedField in $orderedFields)
246:     									#set ($orderedField = $orderedField.trim())
247:     									#if ($bio.get($orderedField) && $fieldValue.length() == 0)
248:     										#set ($fieldValue = $bio.get($orderedField))
249:     									#end
250:     								#end
251:     							#else
252:     								#if ($bio.get($field))
253:     									#set ($fieldValue = $bio.get($field))
254:     								#end
255:     							#end
256: 							#end
257: 							#set ($dataTitle = $tool.list.get($rosterLabels, $tool.math.sub($velocityCount, 1)))
258: 							#set ($class = "")
259: 							#if ($field.contains("first_name") || $field.contains("last_name") || $field.contains("full_name")) 
260: 								#set ($class = "name") 
261: 							#end
262: 							#if ($field.equals("number"))
263: 								#set ($class = "number")
264: 							#end
265:     						<td data-title="${dataTitle}" #if ($class.length() > 0) class="${class}" #end>
266:     							#set ($fieldValue = $fieldValue.trim())
267:     							#if ($fieldValue.length() > 0)
268:     								#if ($field.contains("first_name") || $field.contains("last_name") || $field.contains("full_name"))
269:     									<a href="$bioinfo.url">$fieldValue</a>
270:     								#elseif ($field.contains("email_address"))
271:     									<a href="mailto:$!bio.get("${value}")">$fieldValue</a>
272:     								#else
273:     									$fieldValue
274:     								#end
275:     							#else
276:     								&nbsp;
277:     							#end
278:     						</td>
279:     					#end
280:     				</tr>
281:     				$row.alternate
282:     			#end
283:     		</tbody>
284:     	</table>
285:     </div>
286: #elseif ($rosterLayout == "headshot")
287: 	
288: 	#set ($headshotSize = "medium")
289: 	#if ($options.get("roster_headshot_size"))
290:       #set ($headshotSize = $options.get("roster_headshot_size"))
291:     #end
292: 	
293: 	<div class="roster headshot-layout ${headshotSize}">
294:     <ul class="clearfix">
295:     	#foreach ($bioinfo in $headlines)
296:     	<li class="player">
297:     		<a href="$bioinfo.url">
298:     		
299:     		#set ($bio = $bioinfo.getDataAsObject().getAttributes())
300:     		#printHeadshot($bioinfo)
301: 
302:     		#if ($bio.get("number") && $!bio.get("number").length() > 0)<span class="number">$bio.get("number")</span>#end
303: 
304:     		#if ($bio.get("first_name") && $bio.get("last_name"))<span class="name"><span class="firstname">$bio.get("first_name")</span> <span class="lastname">$bio.get("last_name")</span></span>#end
305:     		</a>
306:     	</li>
307:     	#end ## outer-loop
308:     </ul>
309: 	</div>
310: #end ## roster-layout
311: 
312: #set ($rosterFooter = "${page.url}-footer")
313: 
314: #if ($website.exists($rosterFooter))
315:   <div class="roster-footer">$website.include($rosterFooter)</div>
316: #end
317: 
318: </div> ## mod-roster
319: 
320: #if ($showHeadshotView)
321:   <script src="$website.cdn("/info/cookie-handler.js")"></script>
322:   <script src="$website.cdn("/info/jquery.history.js")"></script>
323:   <script>
324:   (function($) {
325:   $(function() {
326:     var root = $('.mod-roster');
327:     var toggleButtons = $('.toggle-buttons li', root);
328:     
329:     var loadView = function(href, view) {
330:       root.addClass('loading');
331:       toggleButtons.filter('.' + view).addClass('loading').siblings().removeClass('active');
332:     
333:       jQuery.get(href, { ajax: true }, function(data) {
334:         var newRosterContent = $(data).find('.roster');
335:         $('.roster', root).replaceWith(newRosterContent);
336:         toggleButtons.filter('.' + view).removeClass('loading').addClass('active');
337:         root.removeClass('loading');
338:       });
339:     };
340:     
341:     History.Adapter.bind(window,'statechange',function(){ 
342:       var state = History.getState();
343:       loadView(state.url, state.data.view);
344:     });
345:     
346:     toggleButtons.on('click', function() {
347:       if (!$(this).hasClass('active') && !root.hasClass('loading')) {
348:       
349:         var href = $(this).children('a').attr('href');
350:         
351:         if ($(this).is('.list')) {
352:           createCookie('roster_view', "list", 14);
353:           History.pushState({ view: "list" }, null, href);
354:         } else {
355:           createCookie('roster_view', "headshot", 14);
356:           History.pushState({ view: "headshot" }, null, href);
357:         }
358:       }
359:       return false;
360:     });
361:     
362:     root.on('click', '.sortable', function() {
363:       History.pushState({ view: 'list' }, null, $(this).attr('href'));
364:       return false;
365:     });
366:   });
367:   })(jQuery);
368:   </script>
369: #end
370: 
371: #elseif ($restriction.code == 11) ## Video
372: 
373: #set ($inclURL = "${page.url}?tmpl=video-grid-template")
374: #if ($website.isIncluded() && (!$request.getParameter("playlist") || $request.getParameter("playlist") != false))
375:   #set ($inclURL = "${page.url}?tmpl=video-headline-template")
376: #end
377: 
378: $website.includeAgain($inclURL)
379: 
380: #elseif ($restriction.code == 12)
381:   ## Podcast
382: 
383: <h3>Podcast Feed#if ($page.title.length() > 0) For: $page.title #end</h3>
384: 
385: <p>
386: Please add the entire URL Below to your Podcast Software:
387: </p>
388: 
389: <input type="text" size="60" value="http://${request.serverName}${page.url}?feed=rss_2.0" name="searchterm"/>
390: 
391: <p>
392: How to Listen to this Podcast:
393: </p>
394: <ol>
395: <li>Download a Podcast Aggregator from <a href="http://juicereceiver.sourceforge.net/">here</a>.</li>
396: <li>Copy the entire link in the box above to the "URL" or "feed" field in your software.</li>
397: <li>Listen to, and enjoy!</li>
398: </ol>
399: 
400: #elseif ($restriction.code == 15)
401:   ## unkonwn
402: 
403: #set ($itemsRendered = 0)
404: <div class="store-wrapper">
405: <div class="store-items">
406: 
407: <table cellpadding="0" cellspacing="0">
408: #foreach ($article in $headlines)
409: 
410: #if ($itemsRendered > 0)<tr><td colspan="5" class="sep"></td></tr>#end
411: 
412: <tr #if ($velocityCount % 2 == 0) class="alternate-row" #end>
413: 
414: #set ($item = $article.dataAsObject)
415: 
416: ## This skips items where bidding has ended
417: #if ($item.endBidding.after($now))
418: 
419: <td style="width: 80px; padding: 10px 0;">
420: #if ($article.thumbnailURL.length() > 0)
421: <img src="$article.thumbnailURL?max_width=70&max_height=70&crop=true" />
422: #else
423:   <img src="$website.includeAgain("marketplace_thumbnail.jpg?print=src")?max_width=70&max_height=70&crop=true" /><br />
424:  #end
425: </td>
426: 
427: <td style="width: 35%;">
428: <a href="$article.url" class="title">$article.title#if (!($article.title.length() > 0))<i>No title</i>#end</a><br />
429: #if ($article.leadIn.length() > 0)
430: $article.leadIn
431: #end
432: </td>
433: <td align="center"><strong>Current bid:</strong><br />$formatter.formatCurrency($item.price)</td>
434: <td align="center"><strong># of bids:</strong><br /> #if ($item.history) $item.history.size() #else None #end</td>
435: <td align="center"><strong>Ends:</strong><br /> $formatter.formatDateSiteTimezone($item.endBidding, "EEE MMM  d, h:mm a")</td>
436: 
437: #set ($itemsRendered = $itemsRendered+1) 
438: 
439: #end
440: </tr>
441: #end ## foreach
442: </table>
443: 
444: #if ($itemsRendered == 0)
445: <h1>No Items Available</h1>
446: <p>Check back soon!</p>
447: #end
448: 
449: </div>
450: </div>
451: 
452: 
453: 
454: #elseif ($restriction.code == 16)
455:   ## Merchandise
456: 
457: 
458: #set ($totalItems = 0)
459: #set ($totalRows = 0)
460: #set ($itemsRead = 0)
461: #foreach ($article in $headlines)
462: #set ($totalItems = $totalItems + 1)
463: #if ($velocityCount % 4 == 1) #set ($totalRows = $totalRows + 1) #end
464: #end
465: 
466: 
467: <div class="store-wrapper">
468: 
469: #if ($page.title.length() > 0) <h1>$!page.title</h1>#end
470:  <div class="store-items">
471: 
472: <table cellpadding="0" cellspacing="0" border="0">
473: 
474: #foreach( $currentRow in [1..$totalRows] )
475: 
476: <tr>
477: 
478: ## 1st Loop for the image and caption
479: #foreach ($article in $headlines)
480: 
481: #if ( ($velocityCount > $itemsRead) and ($velocityCount <= ($currentRow * 4))   )
482: 
483: #set ($item = $article.dataAsObject)
484: 
485: <td align="center" width="25%">
486:   <a href="$article.url" class="container">
487:    #if ($article.thumbnailURL.length() > 0)
488:     <img src="$article.thumbnailURL?max_width=125&max_height=125&crop=true" /><br />
489:    #else
490:      <img src="$website.includeAgain("marketplace_thumbnail.jpg?print=src")?max_width=125&max_height=125&crop=true" /><br />
491:     #end
492:   <span class="caption">$formatter.formatCurrency($item.price)<br />Buy Now</span>
493:   </a>
494:  </td>
495: 
496: #end ## ends if check
497: 
498: #end ## ends foreach
499: 
500: </tr><tr>
501: 
502: ## Second Loop for the titles
503: #foreach ($article in $headlines)
504: 
505: #if ( ($velocityCount > $itemsRead) and ($velocityCount <= ($currentRow * 4))   )
506: 
507: #set ($item = $article.dataAsObject)
508: 
509: <td align="center" width="25%">
510:   <a href="$article.url">
511:   #if ($article.title.length() > 0)
512:     <strong class="item-title">$article.title</strong>
513:   #else
514:     <strong class="item-title" style="font-style: italic;">No title</strong>
515:   #end
516:   </a>
517:  </td>
518: 
519: #end ## ends if check
520: 
521: #end ## ends foreach
522: 
523: #set ($itemsRead = $itemsRead + 4)
524: 
525: </tr>
526: 
527: #end ## ends outerloop
528: 
529: </table>
530: 
531:  </div>
532: </div>
533: 
534: 
535: 
536: #elseif ($restriction.code == 17)
537:   ## Marketplace
538: <div class="store-wrapper">
539: 
540: ## BUYNOW / BIDNOW
541: #if ($page.title.length() > 0) <h1>$!page.title</h1>#end
542: 
543:    <div class="store-items">
544: 
545: <table cellpadding="0" cellspacing="5">
546:  <tr>
547: 
548: #set ($colCount = 0)
549: 
550: #foreach ($article in $headlines)
551: 
552: #set ($item = $article.dataAsObject)
553: 
554: #if ($formatter.isNull($item.endBidding, false))
555:   #set ($isStoreOrAuction = "auction")
556: #else
557:  #set ($isStoreOrAuction = "store")
558: #end
559: 
560: #if ($isStoreOrAuction == "auction" && $item.endBidding.before($now))
561: 
562: #else
563: 
564: #set ($colCount = $colCount + 1)
565: 
566: <td align="center" width="25%">
567: 
568: 
569:   <a href="$article.url" class="container">
570: ## THUMBNAIL
571:    #if ($article.thumbnailURL.length() > 0)
572:     <img src="$article.thumbnailURL?max_width=125&max_height=125&crop=true" />
573:    #else
574:      <img src="$website.includeAgain("marketplace_thumbnail.jpg?print=src")?max_width=125&max_height=125&crop=true" /><br />
575:     #end
576:   <span class="caption">
577: 
578:   ## WHETHER A STORE ITEM OR AUCTION ITEM
579:   #if ($isStoreOrAuction == "auction")
580:     Current Bid: $formatter.formatCurrency($item.price)<br />Bid Now
581:   #else
582:     Price: $formatter.formatCurrency($item.price)<br />Buy Now
583:   #end
584: 
585:   </span>
586: 
587: ## ITEM TITLE
588:   #if ($article.title.length() > 0)<strong class="item-title" style="margin-bottom: 5px;">$article.title</strong>#else<strong class="item-title" style="font-style: italic;">No title</strong>#end
589:   </a>
590: ## SHOW TIME REMAINING IF AUCTION ITEM
591:    #if ($isStoreOrAuction == "auction")
592:     <br />
593:      #if ($item.endBidding.after($now))
594:      Time Remaining: <br>
595:      <span class="value">$formatter.formatTimeRemaining($item.endBidding)</span>
596:      #else
597:      <span class="value">Bidding is Over!</span>
598:      #end
599:    #end
600: 
601:  </td>
602: 
603: #if ($colCount % 4 == 0 && $velocityCount < $headlines.size())
604:   #set ($colCount = 0)
605:     </tr><tr>
606: #end
607: 
608: #end ## end bidding check
609: 
610: #end ## foreach
611: </tr>
612: </table>
613: 
614: </div>
615: 
616: </div>
617: #elseif ($restriction.code == 18)
618:   ## Splash, do not print nothing.
619:   #foreach ($splash in $headlines)
620:   	#set ($item = $splash.dataAsObject)
621: 	## This skips items where bidding has ended
622:  	#if ($item.expirationDate.after($now) && $item.liveDate.before($now))
623: 		$website.include("$splash.url?from_headlines=true")
624: 		#stop
625: 	#end
626:   #end
627: #else
628: ## Default headlines rendering
629: 
630: $website.includeAgain("${page.url}?tmpl=news-template&showFilters=true")
631: 
632: #end ## Done with different types of headlines
633: 
634: #if ($request.getParameter("ajax") == "true")
635:   $website.decorate("")
636: #end
637: 
638: $rss
639: 
640: $wiki
641: 
642: <!-- from: generic theme -->