0

I'm looking for a solution to change a Drupal Session Variable (PrivateTempStoreFactory) without redirecting to another page. I can accomplish altering the variable by using routing.yml in my module, but this is not a solution that is effective as it changes to a different path.

Simply put, I am trying to create a Role menu in which a User can select an available role that has been assigned to them. When they select a role, their role should be updated in the session and redirected back to the page they started the action (Menu and other things may change, hence the page needs to be reloaded).

Any help would be appreciated! I'm learning Drupal 8 and it's been quite the curve!

jrbedard
  • 3,662
  • 5
  • 30
  • 34
Josh S.
  • 612
  • 3
  • 8
  • I have to alter a server-side variable, through the Drupal framework. A simple JavaScript solution would not solve my issue. Thanks for the response though! – Josh S. Dec 12 '16 at 18:32

1 Answers1

0

Ended up utilizing the Drupal Ajax API where the callback would use a location.reload(). Problem Solved

Josh S.
  • 612
  • 3
  • 8