I'm a bit hung up on this one, any pointers or solutions would be appreciated.
I'd like to iterate through the Umbraco Media Tree in order to display a list of folders (in the proper hierarchy). I know that T. Hoehler has done this for his Utilities for Umbraco, but in this case I'm looking for a fairly simple approach to include in a user control.
I also noted this thread, but it appears to be open still:
http://forum.umbraco.org/yaf_postst2179_How-to-get-the-MediaTreeRoot-using-C.aspxI can get as far as listing the Media Nodes and determining the ContentType ("Folder" in this case), but can't seem to get to the next step (nodeName, ParentId, etc...)
Code:
Media[] m = umbraco.cms.businesslogic.media.Media.GetRootMedias();
for (int i = 0; i < m.Length; i++)
{
if (m[i].ContentType.Alias.Equals("Folder"))
{...
Thanks, -Paul
motusconnect.com :: level-2 certified :: MVP 2008/2009