This produces the location of the page that contains the slot and not the slotted item folder location.
Alternatively I tried creating a shared template and linking it though the slot. This produced the same file path as before (the path to the page containing the slot):
I believe you will need to clone the assembly item of the item in the slot…
Something like the following may work…note i haven’t actually tried it out…
#if($sys.currentslot.relresults.size() != 0)##
## cloning assembly item of the node
#set($currItemAssemblyItem = $sys.currentslot.relresults.get(0).clone())##
## not sure if the following line is needed..you may not need it as you have the assembly item of the first item in the slot above....
$currItemAssemblyItem.setNode($sys.currentslot.relresults.get(0).getNode())##
$user.psoFolders.getParentFolderPath($currItemAssemblyItem)##
#end##
I tried your suggestion (with and without the setnode) but I am still receiving the same path. I double checked that it is reading the right slot and is pointing to the correct content id.
Ok…this may be a silly question, but the function that you are using is “getParentFolderPath”…does pso provide a “getFolderPath” (ie perhaps $rx.location.folderPath / $rx.location.path or another build in function)?
With the getParentFolderPath, the parent of the slot should be the current item (i think) and hence you are getting the results that you are…
Since i haven’t used that function, i’m not sure exactly what getParentFolderPath does, but from the name i wouldn’t be surprised if that’s what it is doing…