Lightroom 3 Book for Digital Photographers by Scott Kelby »

How to Get Section and Category of Article in Joomla

Suppose you want to get the section and category of an article that is being displayed in your Joomla template. You first need to get the article ID. From the article id, you query the database to get the section and category that this article belongs under.

Here is an example code that does this...

This code should work in your template files such as index.php.