By Andy on Sunday, 01 January 2017
Posted in Technical Issues
Replies 3
Likes 0
Views 396
Votes 0
Can't find this in the developer documentation.. so hoping I can ask it here..

I want to have a module on my group pages which runs a little PHP. Is there a known variable I can put in their that would be the group ID number of the page being looked at?

I can see the ID number in the URL for example - but I can't work out how I could capture it and use as a PHP variable?
Hello Andy,

You would need to obtain the ID from the query string (assuming that you are referring to the group item page) . It should be something like this,

[gist]
$id = JRequest::getVar('id', 0, 'int');
[/gist]
·
Sunday, 01 January 2017 15:47
·
0 Likes
·
0 Votes
·
0 Comments
·
Fantastic Mark. Thanks for the guidance on this one. It's working GREAT.
·
Sunday, 01 January 2017 22:22
·
0 Likes
·
0 Votes
·
0 Comments
·
You are most welcome Andy
·
Sunday, 01 January 2017 23:25
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post