CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Post Process add to url
Pages: [1]

Author Topic: Post Process add to url  (Read 774 times)

zesgar

  • I post occasionally
  • **
  • Posts: 107
  • Karma: 2
  • CiviCRM version: 4.3.4
  • CMS version: Joomla 2.5
Post Process add to url
March 06, 2011, 04:51:14 pm
How do I ad a variable to the url without using the redirect? in CRM System Utils?

Kiran Jagtap

  • Ask me questions
  • ****
  • Posts: 533
  • Karma: 51
Re: Post Process add to url
March 06, 2011, 09:03:19 pm
There are mainly two tasks involve.

1. First you need to retrieve existing url. 
2. Then you could append your values to existing url and push to system.

Code might be like.

Code: [Select]
$session = CRM_Core_Session::singleton( );
$existingUrl = $session->popUserContext( );
$modifiedUrl = $existingUrl .'&myVar=MyVal';
$session->pushUserContext( $modifiedUrl  );

hope this help

kiran
You Are Designed To Choose... Defined By Choice.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Post Process add to url

This forum was archived on 2017-11-26.