2

Hi I have this sentence

$g->addButton('')->set('NEW ACTIVITY')->js('click')->univ()->redirect('newactivity');

Is it possible to call the "redirect" method and passing parameters via $_GET ? so in the page "newactivity" I can ask for $_GET['something'] ?

Something like this

$g->addButton('')->set('NEW ACTIVITY')->js('click')->univ()->redirect('newactivity?id=1'); (this doesn't work)

or

   $g->addButton('')->set('NEW ACTIVITY')->js('click')->univ()->redirect('newactivity','id=1');

Thanks

AJM.MARTINEZ
  • 477
  • 2
  • 10

2 Answers2

2

What you need is to properly build destination URL.

http://agiletoolkit.org/learn/understand/page/link

->univ()->redirect($this->api->getDestinationURL('newactivity',array('id'=>1)));

using stickyGET will affect ALL the urls you are going to produce form this point on. So if you add 2 links, each of them would be passing ID.

stickyGET is better if you need to pass argument which was already passed through GET, such as

array('id'=>$_GET['id']);
romaninsh
  • 10,606
  • 4
  • 50
  • 70
0

Here is a place where other ATK4 Developers chat too, perhaps another resource for your ATK4 Q's. https://chat.stackoverflow.com/rooms/2966/agile-toolkit-atk4

Community
  • 1
  • 1
CAM
  • 185
  • 13