Joomla – Listado de categorias del componente Zoo

[php]
<?php
function getCategories()
{
$db =& JFactory::getDBO();
$query = "SELECT * FROM jos_zoo_category WHERE parent=0 AND published=1";
$db->setQuery($query);
$dbl_category = $db->loadObjectList();
return $dbl_category;
}

$categories = getCategories();

foreach($categories as $category){
echo $category->name;
}
?>
[/php]

post-author