### VERSION 2 HAS BEEN OPTIMIZED TO MINIMIZE CMS BUILD TIME USING ONE DYNAMIC LOOP AND FIVE CONTROLLED LOOPS ###

Printer Friendly

### DECLARE ARRAYS ### #set ($NavHeader="") #set ($NavHeaderUrl="") #set ($CatHeader= [0]) #set ($Faculty= [0]) #set ($FacultyUrl= [0]) #set ($Executive= [0]) #set ($ExecutiveUrl= [0]) #set ($Managerial = [0]) #set ($ManagerialUrl= [0]) #set ($Support= [0]) #set ($SupportUrl= [0]) #set ($Technical= [0]) #set ($TechnicalUrl= [0]) ### COUNTERS ### #set ($countF = 0) #set ($countE = 0) #set ($countM = 0) #set ($countS = 0) #set ($countT = 0) #set ($articles = $_XPathTool.selectNodes($contentRoot, "/system-index-block/system-page[display-name != '' and not(contains(path, '_internal'))]")) ### SORT BY CATEGORY ### $_SortTool.addSortCriterion("system-data-structure/JobPost/JobSearchCategory", "", "text", "descending", "upper-first") $_SortTool.sort($articles) ##

Posted Jobs

##
## #set ($_MathTool.toInteger($count) = 1) #if ($articles.size() > 0) ## #set ($count = 1) #foreach ($article in $articles) ## #set ($count = $count + 1) ### EXTRACT DATA STRUCTURE FROM CURRENT PAGE ### #set ($sds= $_XPathTool.selectSingleNode($article , "system-data-structure")) ### DECLARE VARIABLES ### #### USING RAW SYSTEM TIME = EPOCH #### #set ($rOpenDate= $sds.getChild("date").value) #set ($OpenDate= $_DateTool.getDate($sds.getChild("date").value)) #set ($NowDateInt = $_MathTool.toInteger($NowDate) ) #set ($rCloseDate= $sds.getChild("enddate").value) #set ($CloseDate= $_DateTool.getDate($sds.getChild("enddate").value)) #set ($rCloseDateInt= $_MathTool.toInteger($rCloseDate) ) #set ($NowDate= $_DateTool.getSystemTime()) #set ($OpenUntilFiled = $sds.getChild("OpenUntilFiled").value) #set ($JobCat= $_XPathTool.selectSingleNode($sds, "JobPost/JobSearchCategory")) ### INDEX PAGE ### #set ($indexed = $article.getChild("name").value) ### FORMAT DISPLAY ### #set ($fCloseDate = $_DateTool.format('MMMM dd yyyy', $CloseDate)) #set ($fNowDate = $_DateTool.format('MMMM dd yyyy', $NowDate)) #set ($DateCompare = $_DateTool.difference($NowDate, $CloseDate)) #set ($Difference = $_MathTool.sub($rCloseDate,$NowDate)) #set($DisplayName = $_SerializerTool.serialize($article.getChild("display-name"), true)) #set($Path = $_SerializerTool.serialize($article.getChild("path"), true)) ### LOOPING THROUGH SORTED CATEGORIES LIST ### #if ($indexed == "index") ## INDEX CHECK BEGINS ## ##

$DisplayName

#set($NavHeader= $DisplayName ) #set($NavHeaderUrl= $article.getChild('path').value) #elseif ($currentJobCat != $JobCat.value) ## EXTRACT CATEGORY TITLE BEGINS ## #set($CatHeader= $Header.add($JobCat.value)) #end ## INDEX CHECK ENDS ## #if (($JobCat.value== "Faculty")&& ( ($OpenUntilFiled == "Yes") || ($Difference > 0))) #set($dummy = $Faculty.add($DisplayName)) #set($dummy = $FacultyUrl.add($Path)) #end #if (($JobCat.value == "Executive")&& ( ($OpenUntilFiled == "Yes") || ($Difference > 0))) #set($dummy = $Executive.add($DisplayName)) #set($dummy = $ExecutiveUrl.add($Path)) #end #if (($JobCat.value == "Managerial and Professional") && ( ($OpenUntilFiled == "Yes") || ($Difference > 0))) #set($dummy = $Managerial.add($DisplayName)) #set($dummy = $ManagerialUrl.add($Path)) #end #if (($JobCat.value== "Support Staff")&& ( ($OpenUntilFiled == "Yes") || ($Difference > 0))) #set($dummy = $Support.add($DisplayName)) #set($dummy = $SupportUrl.add($Path)) #end #if (($JobCa.valuet== "Information Technology/Technical")&& ( ($OpenUntilFiled == "Yes") || ($Difference > 0))) #set($dummy = $Technical.add($DisplayName)) #set($dummy = $TechnicalUrl.add($Path)) #end #end #end #set ($CatHeader= [0]) ### DISPLAY ###

$NavHeader

Support Staff

#foreach ($val in $Support) #set ($countSUrl = 0) #foreach ($url in $SupportUrl) #if (($countSUrl == $countS) && $countS > 0)

$val

#end #set($countSUrl = $countSUrl + 1) #end #set($countS = $countS + 1) #end
### DEALLOCATE MEMORY #set ($Support= [0]) #set ($SupportUrl= [0])

Managerial and Professional

#foreach ($val in $Managerial ) #set ($countMUrl = 0) #foreach ($url in $ManagerialUrl ) #if (($countMUrl == $countM) && $countM > 0)

$val

#end #set($countMUrl = $countMUrl + 1) #end #set($countM = $countM + 1) #end
### DEALLOCATE MEMORY #set ($Managerial = [0]) #set ($ManagerialUrl= [0])

Information Technology/Technical

#foreach ($val in $Technical) #set ($countTUrl = 0) #foreach ($url in $TechnicalUrl) #if (($countTUrl == $countT) && $countT > 0)

$val

#end #set($countTUrl = $countTUrl + 1) #end #set($countT = $countT + 1) #end
### DEALLOCATE MEMORY #set ($Technical= [0]) #set ($TechnicalUrl= [0])

Faculty

#foreach ($val in $Faculty) #set ($countFUrl = 0) #foreach ($url in $FacultyUrl ) #if (($countFUrl == $countF) && $countF > 0)

$val

#end #set($countFUrl = $countFUrl + 1) #end #set($countF = $countF + 1) #end
### DEALLOCATE MEMORY #set ($Faculty= [0]) #set ($FacultyUrl= [0])

Executive

#foreach ($val in $Executive) #set ($countEUrl = 0) #foreach ($url in $ExecutiveUrl) #if (($countEUrl == $countE) && $countE > 0)

$val

#end #set($countEUrl = $countEUrl + 1) #end #set($countE = $countE + 1) #end
### DEALLOCATE MEMORY #set ($Executive= [0]) #set ($ExecutiveUrl= [0])