Reputation: 1
its posibble to get view like this (with module or component) in joomla k2?
what i mean is like this
anyone can help? please.. you will save my live :cheer:
Upvotes: 0
Views: 1507
Reputation: 13738
You can use like this example of menus drop down if you want to use for catagories use appropriate tables (for radios use level field of table as main in ul,ol indteadof select ):-
<?php $db = JFactory::getDBO();
$query = "SELECT m.id, m.title,m.level,mt.menutype FROM #__menu AS m INNER JOIN #__menu_types AS mt ON mt.menutype = m.menutype WHERE mt.menutype = m.menutype AND m.published = '1' ORDER BY mt.menutype,m.level";
$db->setQuery($query);
$rows = $db->loadObjectList();?>
<select id="setredirct" name="settings[]">
<option value="" selected="selected">---Default---</option>
<?php foreach ($rows as $row) {?>
<option value="<?php echo $row->id;?>" >
<?php echo '<b>'.$row->menutype.'</b>';
if ($row->level == 1) { echo '-';}
if($row->level == 2) { echo '--';}
if($row->level == 3) { echo '---';}
if($row->level == 4) { echo '----';}
if($row->level == 5) { echo '-----';}
echo $row->title;?>
</option>
<?php }?>
</select>
Upvotes: 1