The dao classes have auto-generated getter methods for each of their data properties.  So to get the item id, you would call:<div><br></div><div>$itemId = $item->getItemId();</div><div><br></div><div>Items are actually allowed to be simultaneously in multiple folders (although that is uncommon), and the way to get all of the parent folders of an item is to call:</div>

<div><br></div><div>$folders = $item->getFolders();</div><div><br></div><div>It will return a list of folder daos representing all of the folders in which the item resides.</div><div><br></div><div>Thanks,</div><div><br>

</div><div>Zach</div><div><br><div class="gmail_quote">On Thu, Jul 5, 2012 at 4:38 PM, Mona Wong <span dir="ltr"><<a href="mailto:mona@sdsc.edu" target="_blank">mona@sdsc.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div style="word-wrap:break-word"><div><br></div><span style="white-space:pre-wrap">  </span>In my controller, I have the itemid and I'd like to know the directory which contains that item, how do I get that info?<div>

<br></div><div><span style="white-space:pre-wrap">    </span>I tried "$this->Item->load ( $itemid )" but that doesn't contain the info I needed:</div><div><span style="font-family:Verdana,'Lucida Grande','Lucida Sans Unicode',helvetica,arial,verdana,sans-serif;font-size:14px"><br>

</span></div><div><span style="font-family:Verdana,'Lucida Grande','Lucida Sans Unicode',helvetica,arial,verdana,sans-serif;font-size:14px">item = object(ItemDao)#134 (17) { ["_model"]=> string(4) "Item" ["key":protected]=> NULL ["ModelLoader"]=> object(MIDAS_ModelLoader)#130 (0) { } ["_key"]=> string(7) "item_id" ["saved"]=> bool(true) ["item_id"]=> string(5) "18876" ["name"]=> string(9) "annio.xml" ["description"]=> string(0) "" ["type"]=> string(1) "0" ["sizebytes"]=> string(4) "1192" ["date_creation"]=> string(19) "2012-06-29 19:50:19" ["date_update"]=> string(19) "2012-07-02 16:10:01" ["thumbnail"]=> string(0) "" ["view"]=> string(2) "18" ["download"]=> string(2) "11" ["privacy_status"]=> string(1) "1" ["uuid"]=> string(45) "<scrubbed>" } ]</span></div>

<div><div><br></div><div>Mona</div><div><br></div><div>
<span style="line-height:normal;text-indent:0px;border-collapse:separate;letter-spacing:normal;font-variant:normal;text-transform:none;font-size:medium;font-style:normal;white-space:normal;font-family:Helvetica;word-spacing:0px"><span style="line-height:normal;text-indent:0px;border-collapse:separate;letter-spacing:normal;font-variant:normal;text-transform:none;font-size:medium;font-style:normal;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">

<span style="line-height:normal;text-indent:0px;border-collapse:separate;letter-spacing:normal;font-variant:normal;text-transform:none;font-style:normal;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">

<span style="line-height:normal;text-indent:0px;border-collapse:separate;letter-spacing:normal;font-variant:normal;text-transform:none;font-style:normal;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">

<span style="line-height:normal;text-indent:0px;border-collapse:separate;letter-spacing:normal;font-variant:normal;text-transform:none;font-style:normal;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">

<span style="line-height:normal;text-indent:0px;border-collapse:separate;letter-spacing:normal;font-variant:normal;text-transform:none;font-style:normal;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">

<span style="line-height:normal;text-indent:0px;border-collapse:separate;letter-spacing:normal;font-variant:normal;text-transform:none;font-style:normal;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">

<span style="line-height:normal;text-indent:0px;border-collapse:separate;letter-spacing:normal;font-variant:normal;text-transform:none;font-style:normal;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">

<span style="line-height:normal;text-indent:0px;border-collapse:separate;letter-spacing:normal;font-variant:normal;text-transform:none;font-style:normal;font-size:12px;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">

<span style="line-height:normal;text-indent:0px;border-collapse:separate;letter-spacing:normal;font-variant:normal;text-transform:none;font-style:normal;font-size:12px;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">

<div>*********************************************</div><div>    Mona Wong</div><div>    Web & iPad Application Developer</div><div>    San Diego Supercomputer Center</div><div><br></div><div>    Believing we are in control is an</div>

<div>    illusion that brings suffering.</div><div><div><div>*********************************************</div><div><span style="font-size:medium"><br></span></div></div></div></div></span></div></span></div></span></div>

</span></div></span></div></span></div></span></div></span><br></div></span><br></span><br>
</div>
<br></div></div><br>_______________________________________________<br>
Midas mailing list<br>
<a href="mailto:Midas@public.kitware.com">Midas@public.kitware.com</a><br>
<a href="http://public.kitware.com/cgi-bin/mailman/listinfo/midas" target="_blank">http://public.kitware.com/cgi-bin/mailman/listinfo/midas</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>
</div>