Folder path for auto slot query

I’m trying to populate an auto slot with items that are in the same directory as the parent item. How do I reference the parent directory in the sys_AutoSlotContentFinder query?

Here’s what I have (where ‘filepath’ is where I would put a file path reference):

SELECT * FROM rx:pc_ct_faq WHERE jcr:path like [filepath]

Thanks in advance for any help.

I answered my own question (based on other threads).

I set the page path in the slot template in this manner:

#set($pagepath = $user.psoFolders.getParentFolderPath($sys.item.guid))
#slot($slotname “” “” “” “” “page_path=$pagepath”)

Then the auto slot query pulls in the page_path variable like so:

SELECT * FROM rx:pc_ct_faq WHERE jcr:path like :page_path