I need to be able to get a Media folder by it's name, before you say use the ID I can't as the Media folders are automatically generated so I don't know the Ids.
I have a list of folders as follows
Media ---Folder1 ---Folder2 ---Folder3
There doesn't seem to be a function available to do this and I can't work out how to get at the XML. I have tried Media.GetRootMedias() but is returns an "object not set..." Can anyone help?
Forgot to say above (and can't update it) I am using umbraco 4.0.3
Another Update..
I thought I'd create a root folder.. and put all the other folders in it so I could call this and and then loop its children, but there appears to be a problem. My media folderId is: 1673, So I am going Media rootMediaFolder = new Media(1673), and I get object not set.
If I try Library.GetMedia(1673) I get no results..!
Get media Folder By Name or Get All Media Folders
Hi
I need to be able to get a Media folder by it's name, before you say use the ID I can't as the Media folders are automatically generated so I don't know the Ids.
I have a list of folders as follows
Media
---Folder1
---Folder2
---Folder3
There doesn't seem to be a function available to do this and I can't work out how to get at the XML.
I have tried Media.GetRootMedias() but is returns an "object not set..."
Can anyone help?
Bex
Forgot to say above (and can't update it) I am using umbraco 4.0.3
Another Update..
I thought I'd create a root folder.. and put all the other folders in it so I could call this and and then loop its children, but there appears to be a problem.
My media folderId is: 1673, So I am going Media rootMediaFolder = new Media(1673), and I get object not set.
If I try Library.GetMedia(1673) I get no results..!
What am I doing wrong?
is working on a reply...