Yaric3000

Reviews(1)
 
byYaric3000, April 13, 2009
Content Item Module
I need to show list of contents with the same category of the current dysplaying article. I have added the next fragment into helper.php:
if ($showbyid == 0 ) {
$query = 'SELECT catid' .
' FROM #__content' .
' WHERE id = '.(int) $curid;
$db->setQuery($query);
$showbyid = $db->loadResult();
echo 'Category ID = '.$showbyid;
}

Now I have what I want. This code works when list of IDs equal 0.