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) »
  • how to remember the custom search url?
Pages: [1]

Author Topic: how to remember the custom search url?  (Read 421 times)

jaapjansma

  • I post frequently
  • ***
  • Posts: 247
  • Karma: 9
    • CiviCoop
  • CiviCRM version: 4.4.2
  • CMS version: Drupal 7
  • MySQL version: 5
  • PHP version: 5.4
how to remember the custom search url?
March 11, 2014, 08:29:29 am
Hey all,

I have a question. I have written my own custom search, with an action on each record to edit this item.
On the edit form there is a button 'cancel'  which goes back to the pushed User context.

How do I push the user context in a custom search result form? So that the cancel goes back to the search results.

Thanks
Developer at Edeveloper / CiviCoop

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: how to remember the custom search url?
March 11, 2014, 02:15:12 pm

CRM_Core_Session::pushUserContext()

in general though, we should be moving away from that technique and store it in some "local" context. Primarily in a world of multiple-browser-tabs, having a global userContext does not work well

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

jaapjansma

  • I post frequently
  • ***
  • Posts: 247
  • Karma: 9
    • CiviCoop
  • CiviCRM version: 4.4.2
  • CMS version: Drupal 7
  • MySQL version: 5
  • PHP version: 5.4
Re: how to remember the custom search url?
March 12, 2014, 02:34:04 am
Yes I have figured out the pushUserContext and I am aware of that this a global user context.

But I have to add a url to this function and I want to know how to get the current url so I can pass this to the userContext.
Developer at Edeveloper / CiviCoop

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • how to remember the custom search url?

This forum was archived on 2017-11-26.