Hi,
I'm trying to write a module that outputs the section and categorie name (for Joomla 1.5).
My problem is, that I don't know know how to get the section and categorie ID of the shown page.
Can someone help me?
Thank you in advance,
Tobias
How to get section and categorie id?
Moderators: tjay, seadap, Rogue4ngel, matthewhayashida
Forum rules
-
- Joomla! Fledgling
- Posts: 2
- Joined: Sun Oct 28, 2007 10:28 pm
- lobos
- Joomla! Apprentice
- Posts: 30
- Joined: Wed Jul 19, 2006 3:33 pm
- Location: Sao Paulo, Brasil
- Contact:
Re: How to get section and categorie id?
Do you see the id's come up in the URI / URL ? - if so you can get the id like this:
$id = mosGetParam( $_REQUEST, 'id', '' );
-Lobos
$id = mosGetParam( $_REQUEST, 'id', '' );
-Lobos
Respect and honour, sempre isso, the tribal way, the only way.
http://en.wikipedia.org/wiki/Tribes_Vengeance
http://en.wikipedia.org/wiki/Tribes_Vengeance
Re: How to get section and categorie id?
Is this the correct way for 1.5? I thought the mos was no longer used in 1.5.lobos wrote:Do you see the id's come up in the URI / URL ? - if so you can get the id like this:
$id = mosGetParam( $_REQUEST, 'id', '' );
-Lobos
http://springhillalumni.org • Springhill High School Alumni Association
- lobos
- Joomla! Apprentice
- Posts: 30
- Joined: Wed Jul 19, 2006 3:33 pm
- Location: Sao Paulo, Brasil
- Contact:
Re: How to get section and categorie id?
Sorry I didn't know you were using 1.5... I am sure you can find out the correct function for yourself now that you understand the concept.
-Lobos
-Lobos
Respect and honour, sempre isso, the tribal way, the only way.
http://en.wikipedia.org/wiki/Tribes_Vengeance
http://en.wikipedia.org/wiki/Tribes_Vengeance
Re: How to get section and categorie id?
I only mentioned that as the OP requested for Joomla 1.5.
http://springhillalumni.org • Springhill High School Alumni Association
-
- Joomla! Fledgling
- Posts: 2
- Joined: Sun Oct 28, 2007 10:28 pm
Re: How to get section and categorie id?
Thank you, i thought there is an easier way..
For examble, a URL can look like this:
index.php?option=com_content&view=section&layout=blog&id=5&Itemid=54
or: index.php?option=com_content&view=category&layout=blog&id=50&Itemid=80
or: index.php?view=article&catid=34:categorie_name&id=45:article_name&option=com_content&Itemid=61
So i have to watch what the "view"-parameter looks like.
But thats fine, i will get along with that.
Thanks!
For examble, a URL can look like this:
index.php?option=com_content&view=section&layout=blog&id=5&Itemid=54
or: index.php?option=com_content&view=category&layout=blog&id=50&Itemid=80
or: index.php?view=article&catid=34:categorie_name&id=45:article_name&option=com_content&Itemid=61
So i have to watch what the "view"-parameter looks like.
But thats fine, i will get along with that.
Thanks!
Re: How to get section and categorie id?
If anyone has devised a method of displaying the section id or name please post the solution. Thanks...