Joomla wählen Sie Liste aus der API aus

Post a reply

Smilies
:) :( :oops: :chelo: :roll: :wink: :muza: :sorry: :angel: :read: *x) :clever:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Joomla wählen Sie Liste aus der API aus

by Anonymous » 25 Feb 2025, 07:54

Wie erstelle ich eine Dropdown -Liste mit benutzerdefiniertem Element in Joomla 3.1? Ich habe mir ein paar Beispiele angesehen, aber ich bekomme das Ding nicht zum Laufen. Ich habe Folgendes ausprobiert, aber die Liste ist nicht genariert. Die HTML funktioniert nicht. < /P>

Code: Select all

public function getInput() {
$jinput = JFactory::getApplication()->input;
$sub_id = $jinput->get('sub_id');
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select('*')
->from('#__unis_faculties')
->order('faculty_name');
$db->setQuery($query);
$rows = $db->loadObjectList();

//array_unshift($rows, JHtml::_('select.option', '', JText::_('COM_UNIS_FACULTIES'), 'value', 'text'));
return JHTML::_('select.genericlist',$rows,'faculties',array('class'=>'nourritures','option.attr'=>'data'));

}

Top