$pathtohere, "name" => $i ); } } $breadcrumbNav = new OC_Template( "files", "part.breadcrumb", "" ); $breadcrumbNav->assign( "breadcrumb", $breadcrumb ); $data['breadcrumb'] = $breadcrumbNav->fetchPage(); } // make filelist $files = array(); foreach( OC_Files::getdirectorycontent( $dir ) as $i ){ $i["date"] = OCP\Util::formatDate($i["mtime"] ); $files[] = $i; } $list = new OC_Template( "files", "part.list", "" ); $list->assign( "files", $files ); $data = array('files' => $list->fetchPage()); OC_JSON::success(array('data' => $data)); ?>