I have a problem with using an AutoSlot to select items that are “copy as link” items.
It looks like the slot produces links to the items in the “original” folder and not to the folder where the “copy as link” items are.
Here is my set up:
In /folder1, I create several items of Content Type A and a Page having an Autolist to list CT A items in that folder.
That part works!
In /folder2, I “copy as link” the Content Type A items. I also have a Page having an Autolist to list CT A items in that folder.
That doesn’t work! The generated links point to /folder1 (instead of folder2)
I think I need to re-assemble every snippet in the slot so that it uses the folderid of the page using the autoslot.
If that is correct, I would then need to do someting like this: (not quite spot on) (not working … yet …
#initslot("fonAutoFondCopySlot" $parms) #if($sys.currentslot.relresults.size() > 0) #foreach($child in $sys.currentslot.relresults) ## Here I want to make a clone of item found in slot #set($cl = $child.clone()) ## Here I want to indicate that the clone should use a new folderid #set($x = $cl.setFolderId($f)) ## Here I want to rebuilt clone so it uses new folderid #set($results = $rx.asmhelper.assemble($cl,$sys.currentslot.slot,"")) ## Here I want to show the clone item which should now use the new folderid $rx.doc.extractBody($results) <br> #end #end
Would love some help! Thanks,