Dynamically inserting variants

I am trying to figure out if it is possible to dynamically insert a specific variant of a set of content items into a slot in a parent item. Basically, what I am trying to accomplish is to do what is done in active assembly, only automated so the user does not have to assign items in slot manually. Does anyone out there know how to do that?

Minoo,

Use an Automated Slot. For details, in the Rhythmyx Implementation Guide, see “Creating an Automated Slot”, p. 186.

RLJII

Thanks for the reply. I have autoslots all over our implementation and am pretty familiar with using those, but I am afraid the query for what I am trying to do is just too complicated. I will give it another try and post a more detailed question of what I am trying to accomplish if need be. Thank you again.

You might look into creating a macro that over-rides the slot templates (by initializing the slot…#initslot($slotname $params)) and based on the content type ($sys.item.getPrimaryNodeType().getType()) uses $rx.location.generate to generate a link to the template you want. Not sure if that is what you had in mind as this is not “building” the template but “linking” to it…

I had to do something similar in order to allow non-navigation items into the submenu slot of navigation (in particular if the content type was a url i render it one way vs something else).


If you were thinking of “automatically” populating a slot with a predefined set of items…
You could iterate through the slot on the current item, if there are not enough items, use an auto indexer slot to get say, 3 items from a particular folder and “append” it to display. Essentially, this makes it appear that there are items there, when in reality there aren’t items in that slot…but it fills up empty space…
of course the side effect is that this page has an autoindexer and is published every time…