Is there a similar Copy Slot and Mutate Slot from 5.7 available in 6.52?

I want to be able to copy a slots contents and then render it with various different templates depending on the content types in the slot on the same page. In the old version there was a mutate slots function that allowed you to do this and map multiple old variants to new variants. Is there a way to do this in 6.52? I only see a way to specify a single template.

#__slotsetup("PWS_Middle_Left_Slot" "template=S_Anchor_Abstract_v")##
#set($cloneditem = $sys.assemblyItem.clone())##
$cloneditem.setNode($sys.item)##


#set($sys.currentslot.relresults = $rx.asmhelper.assemble($cloneditem,$sys.currentslot.slot,$completeparams))##
#if($sys.currentslot.relresults.size() > 0)##
	
#foreach( $relresult in $sys.currentslot.relresults )##


#set($body = "$rx.doc.extractBody($relresult)")##
		
			<a name="$relresult.getNode().getProperty("rx:sys_contentid").String">
				$body##<xsl:attribute name="name"><xsl:value-of select="@contentid"/></xsl:attribute>
			</a>		
				
	
#end##

#end##

Sharyn,

No, there’s no “mutateSlotVariants” for 6.x. (the name of this extension is scary enough, when you think about. Of course, I have to take the blame for that).

I don’t recall having this exact problem in the past, but when doing something similar, we’ve used dispatch templates. Build a single dispatch template that looks at the content type of the tem and dispatches to a template based on type. You can probably do this with just the Object Finder and some conditionals in JEXL, although I believe that I wrote a custom java extension for this purpose (that looked up the template name directly). This was part of something special for a customer, and was not built to be re-usable.

I hope this helps

Dave