setQuery($query); $dbpositions = (array) $db->loadAssocList(); $template = $this->form->getValue('template'); $templateXML = JPATH_SITE.'/templates/'.$template.'/templateDetails.xml'; $template = simplexml_load_file( $templateXML ); $options = array(); foreach($dbpositions as $positions) $options[] = $positions['position']; foreach($template->positions[0] as $position) $options[] = (string) $position; $options = array_unique($options); $selectOption = array(); sort($selectOption); foreach($options as $option) $selectOption[] = JHTML::_( 'select.option',$option,$option ); return JHTML::_('select.genericlist', $selectOption, 'jform[params]['.$this->element['name'].']', 'class="form-select '.$this->element['class'].'"', 'value', 'text', $this->value, 'jform_params_helix_'.$this->element['name']); } }