I have a page which displays all current job opportunities that need to be filled. I have an auto slot which retrieves ALL jobs (of content type wwwJob) in a specific order. I created a snippet template which sorts the jobs returned from the auto slot and displays jobs under corresponding job types. I added the jobs using inline variant against the above mentioned snippet template. However, when I added a new job, and then preview the main page containing the inline variant, the newly added job does NOT display. I have another page with an auto slot inserted as inline variant as well. The only difference is the later snippet template uses the system macro #slot() while the former uses my own code as illustrated here:
#set($slotname = “wwwSlotJob”)
#initslot($slotname “”)##
#if($sys.currentslot.slot)##
#if($sys.currentslot.relresults.size() > 0)##
#set ($prevJobType = “”)
<span>
#foreach($job in $sys.currentslot.relresults )##
#set($jobType = $job.node.getProperty(“rx:jobtype”).String)
#set($disptitleAdmin = $job.node.getProperty(“rx:displaytitle”).String)
#if($jobType == $prevJobType)
<li><a href="">$rx.codec.escapeForXml($disptitleAdmin)</a></li>
#elseif ($prevJobType.trim().length() > 0)
</ul>
#set($prevJobType = $jobType)
<h4>$rx.codec.escapeForXml($jobType)</h4>
<ul>
<li><a href="">$rx.codec.escapeForXml($disptitleAdmin)</a></li>
#else
#set($prevJobType = $jobType)
<h4>$rx.codec.escapeForXml($jobType)</h4>
<ul>
<li><a href="">$rx.codec.escapeForXml($disptitleAdmin)</a></li>
#end
#end
<ul>
</span>
#end
#end##
#endslot($slotname)##
Any idea what I am missing?