Page 1 of 1

Query current section id or category

Posted: Wed Jan 30, 2008 4:15 pm
by cacimar
How can I query the section id for the article which is showing?

I'd like to show a different banner based on the section (which is a different city)

Re: Query current section id or category

Posted: Wed Jan 30, 2008 10:46 pm
by cacimar
ok .. fine  :P

Figured it out.

It can be reference through:

JSite::getMenu()->getActive()->query["id"]


I'm already using a variation of "Determining if you're on the front page":
http://dev.joomla.org/component/option, ... ront_page/

Because of that, I already have a variable present:
$menu = & JSite::getMenu()

So, I call
$menu->getActive()->query["id"]


A lot of this was figured out by using:

print_r(JSite::getMenu()->getActive())



I'm going to look at variations of that and have it display when I have debug on..