/** * make a dropdown list of templates * @param string $type - folder name to look for templates * @param string $name - dropdown html name * @param string $default - selected value * @return string html select list */ function templateList($type, $name = 'template', $default = '') { //get the table templates $templates = FabrikHelperAdminHTML::fabrikListDirs(COM_FABRIK_FRONTEND . DS . "views" . DS . $type . DS . "tmpl"); if (is_array($templates)) { foreach ($templates as $file) { $opts[] = JHTML::_('select.option', $file); } } return JHTML::_('select.genericlist', $opts, $name, 'class="inputbox"', 'value', 'text', $default); }