I need to list all images from the media library. I know you think why? But i just need to :) Seeing as the media library root node doesnt seem to have an id,im a bit lost Im trying to start in a folder, work my way to the root, and then down again by:
That's actually not possible (as you found out) - the XML you get back does not have the full context, so you need a little help... and uComponents is your friend (as always :-)
I hit the same "wall" in my LatestEditsDashboard package and found that gem - but it requires uComponents of course, which may not be a real problem :-)
Getting ALL images from media library
I need to list all images from the media library. I know you think why? But i just need to :)
Seeing as the media library root node doesnt seem to have an id,im a bit lost
Im trying to start in a folder, work my way to the root, and then down again by:
But it only gets me the images from the current folder for some reason...
Any help appreciated.
Hi Claus,
That's actually not possible (as you found out) - the XML you get back does not have the full context, so you need a little help... and uComponents is your friend (as always :-)
Checkout this extension: GetMediaByXPath()
I hit the same "wall" in my LatestEditsDashboard package and found that gem - but it requires uComponents of course, which may not be a real problem :-)
So you should be able to do this:
If you need a fallback for when uComponents isn't available, check the source code here for how I do that.
/Chriztian
AWESOME!
H7UR ;)
is working on a reply...