Searching one level

I'm writing a script in which I need to be able to locate assets immediately below and another asset. Is there a way to have $GLOBALS['SQ_SYSTEM']->am->getChildren() only return those immedaitely below instead of the entire subtree? Is there another function that will do this? I know both the name and type of the asset I'm looking for if that helps.

Your going to want to use $GLOBALS['SQ_SYSTEM']->am->getLinks() - but you need to know the assetid.


Get links will get you just the links directly above or below an asset. By default, any asset you request links for will get the child links (which is what your after). This can be changed to get parents by changing the side_of_link arg from 'major' to 'minor' to tell the function the asset you have passed in is the child in the link relationships.