public function get_menu_content() { //Create file template $tpl = new FileTemplate('download/DownloadModuleMiniMenu.tpl'); //Assign the lang file to the tpl $tpl->add_lang(LangLoader::get('common', 'download')); //Load module config $config = DownloadConfig::load(); //Load module cache $download_cache = DownloadCache::load(); //Load categories cache $categories_cache = DownloadService::get_categories_manager()->get_categories_cache(); $downloadfiles = $download_cache->get_downloadfiles(); $tpl->put_all(array('C_FILES' => !empty($downloadfiles), 'C_SORT_BY_DATE' => $config->is_sort_type_date(), 'C_SORT_BY_NOTATION' => $config->is_sort_type_notation(), 'C_SORT_BY_NUMBER_DOWNLOADS' => $config->is_sort_type_number_downloads())); $displayed_position = 1; foreach ($downloadfiles as $file) { $downloadfile = new DownloadFile(); $downloadfile->set_properties($file); $tpl->assign_block_vars('downloadfiles', array_merge($downloadfile->get_array_tpl_vars(), array('DISPLAYED_POSITION' => $displayed_position))); $displayed_position++; } return $tpl->render(); }