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)
Query current section id or category
Moderators: tjay, seadap, Rogue4ngel, matthewhayashida
- cacimar
- Joomla! Apprentice
- Posts: 13
- Joined: Sun Aug 28, 2005 10:29 pm
- Location: Austin, TX
- Contact:
Query current section id or category
Last edited by cacimar on Wed Jan 30, 2008 10:46 pm, edited 1 time in total.
- cacimar
- Joomla! Apprentice
- Posts: 13
- Joined: Sun Aug 28, 2005 10:29 pm
- Location: Austin, TX
- Contact:
Re: Query current section id or category
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:
I'm going to look at variations of that and have it display when I have debug on..
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..