I am receiving a visual error when trying to auto index a content type that contains a manual slot within the snippet template. The slot appears to be aggregating all of the snippets for each loop of the auto index so that all snippets appear in all loops of the auto index.
Content Type Snippet (to be auto-indexed):
{html}
{dl}
{dt}#field("rx:displaytitle"){/dt}
{body}
#slot("erauContactExpert" "{dd}" "" "" "{/dd}" "")##
{/body}
{/dl}
{/html}
Auto Index Tempalte:
#set($oldChar = "-1")##
#initslot($slotname $params)##
<ul>
#foreach($result in $sys.currentslot.relresults)##
#if($result.getNode().primaryNodeType.name == "rx:erauContact")##
#set($currChar = $result.getNode().getProperty("rx:lastname").String.substring(0,1).toUpperCase())##
#elseif($result.getNode().primaryNodeType.name == "rx:erauExpertCategory")##
#set($currChar = $result.getNode().getProperty("rx:displaytitle").String)##
#else##
#set($currChar = $result.getNode().getProperty("rx:displaytitle").String.substring(0,1).toUpperCase())##
#end##
#if($currChar != $oldChar)#set($oldChar = $currChar){li}{a href="#$currChar"}$currChar{/a}{/li} #end##
#end##
{/ul}
#set($oldChar = "-1")##
#foreach($result in $sys.currentslot.relresults)##
#if($result.getNode().primaryNodeType.name == "rx:erauContact")##
#set($currChar = $result.getNode().getProperty("rx:lastname").String.substring(0,1).toUpperCase())##
#elseif($result.getNode().primaryNodeType.name == "rx:erauExpertCategory")##
#set($currChar = $result.getNode().getProperty("rx:displaytitle").String)##
#else##
#set($currChar = $result.getNode().getProperty("rx:displaytitle").String.substring(0,1).toUpperCase())##
#end##
#if($currChar != $oldChar)#set($oldChar = $currChar)##
#slot($slotname "{h3}{a name='$currChar'}{/a}$currChar{/h3}{dl}" "" "" "{/dl}" "list='${currChar}%'&max_results=${max_results}&sitepath=${sitepath}&folderpath=${folderpath}")##
#end
#end##
Current Output (the problem, slots displayed with all names from all slots in the auto index):
<h1 class="">Accidents & Safety</h1>
<ul>
<li><a href="#Accident Analysis">Accident Analysis</a></li> <li><a href="#Aerospace Safety">Aerospace Safety</a></li> <li><a href="#Aircraft Accident Investigation">Aircraft Accident Investigation</a></li>
<li>etc...</li>
<h3><a name='Accident Analysis'></a>Accident Analysis</h3><dl>
<dd>
<dl>name 1</dl>
<dl>name 2</dl>
<dl>name 1</dl>
<dl>name 3</dl>
</dd>
<h3><a name='Aerospace Safety'></a>Aerospace Safety</h3><dl>
<dd>
<dl>name 1</dl>
<dl>name 2</dl>
<dl>name 1</dl>
<dl>name 3</dl>
</dd>
<h3><a name='Aircraft Accident Investigation'></a>Aircraft Accident Investigation</h3><dl>
<dd>
<dl>name 1</dl>
<dl>name 2</dl>
<dl>name 1</dl>
<dl>name 3</dl>
</dd>
Expected Output (slots only showing the names contained in the manual slot):
<h1 class="">Accidents & Safety</h1>
<ul>
<li><a href="#Accident Analysis">Accident Analysis</a></li> <li><a href="#Aerospace Safety">Aerospace Safety</a></li> <li><a href="#Aircraft Accident Investigation">Aircraft Accident Investigation</a></li>
<li>etc...</li>
<h3><a name='Accident Analysis'></a>Accident Analysis</h3><dl>
<dd>
<dl>name 1</dl>
</dd>
<h3><a name='Aerospace Safety'></a>Aerospace Safety</h3><dl>
<dd>
<dl>name 2</dl>
<dl>name 3</dl>
</dd>
<h3><a name='Aircraft Accident Investigation'></a>Aircraft Accident Investigation</h3><dl>
<dd>
<dl>name 1</dl>
<dl>name 2</dl>
</dd>