How can the slot’s $params.template be changed for a specific item depending on the slot items content type. In our system all the content types have a field called
contenttypename.
So we can use the following code to get the content type
#if ($relresult.Node.getProperty(“contenttypename”).String==“rffGeneric”)
##Code to change slot item template #end
So all I need is the code to change the slot item template, any takers?
To your question, you may be able to use $rx.asmhelper.assemble to pass it the item and a specific template, but I haven’t actually tried that…Why exactly do you need the template changed? (Ie force a particular template regardless of what the user chooses?)
You can also use $relresult.Node.definition.internalName to return the ContentType name ( without the rx:).
Tyrone, I’d suggest using a Dispatch template. Set $params.template to your Dispatch template and set the logic of which snippet to display based on the content type.