We launched new forums in March 2019—
join us there
.
In a hurry for help with your website?
Get Help Now!
Back to MODX.com
Forums
Docs
Revo Issues
Blog
My Forums
Add-ons
Add-on Creation and Modification
Search
GET variable CMP
41 Posts
MaZZie
Reply #1,
15 years, 11 months ago
Simple question:
How can I load the $_GET variable into the getlist.php
The GET variable is ’team’.
$c->select(array(’vsTeamsPlayers.*’));
$c->where(array(
’vsTeamsPlayers.teamid’ => $_GET[’team’],
));
$c->sortby($sort);
GH:
http://github.com/MaZZie
TW:
http://twitter.com/Datz_MaZZie
4,149 Posts
splittingred
Reply #2,
15 years, 11 months ago
From where?
shaun mccormick
| bigcommerce mgr of software engineering, former modx co-architect
|
github
|
splittingred.com
41 Posts
MaZZie
Reply #3,
15 years, 11 months ago
In the manager I have the next url: manager/?a=108&action=players&
team
=1
The team variable is needed in core/components/visualteams/players/getlist.php
GH:
http://github.com/MaZZie
TW:
http://twitter.com/Datz_MaZZie
4,149 Posts
splittingred
Reply #4,
15 years, 11 months ago
From a Grid? An Ajax request? In the controller itself? How are you accessing getlist.php?
shaun mccormick
| bigcommerce mgr of software engineering, former modx co-architect
|
github
|
splittingred.com
41 Posts
MaZZie
Reply #5,
15 years, 11 months ago
It’s from a grid
http://github.com/MaZZie/VisualTeams/blob/master/assets/components/visualteams/js/widgets/players.grid.js
with action: ’mgr/players/getList’
The getlist (
http://github.com/MaZZie/VisualTeams/blob/master/core/components/visualteams/processors/mgr/players/getlist.php
)
should get the ’team’ variable to compare it with vsTeamsPlayers.teamid.
Hope that this is enough information.
GH:
http://github.com/MaZZie
TW:
http://twitter.com/Datz_MaZZie
4,149 Posts
splittingred
Reply #6,
15 years, 11 months ago
Okay, now we’re getting somewhere.
Change your baseParams call in the grid to:
,baseParams: { action: 'mgr/players/getList' ,team: MODx.request.team }
The MODx.request JS object stores all the GET params for the page.
shaun mccormick
| bigcommerce mgr of software engineering, former modx co-architect
|
github
|
splittingred.com
41 Posts
MaZZie
Reply #7,
15 years, 11 months ago
That was the missing link. THANKS!
GH:
http://github.com/MaZZie
TW:
http://twitter.com/Datz_MaZZie