UNA 13 Profile Switcher - When Switching Profiles
When using the Profile Switcher is it possible for the "Switch" action to switch you to the profile and take you to the Profile page?
-
- · Cem
- ·
It may not be always preferable, in our setup usually we need to see/use the same page with different profiles
-
-
·
LeonidS
-
·
In reply to Cem
- ·
Hi all!
It will require the PHP code to do it.
-
·
LeonidS
-
- · InPage
-
·
In reply to LeonidS
- ·
Please will you kindly let me know where to place the code?
-
-
·
LeonidS
-
·
In reply to InPage
- ·
Hello @InPage !
It exists in the template/scripts/BxBaseServiceProfiles.php:
'url_switch' => $sUrlProfileAction ? str_replace('{profile_id}', $aProfile['id'], $sUrlProfileAction) : BxDolPermalinks::getInstance()->permalink('page.php?i=account-profile-switcher', array('switch_to_profile' => $aProfile['id'], 'redirect_back' => 1))
So you need to change it in your child class BxTemplServiceProfiles.php like:
'url_switch' => $sUrlProfileAction ? str_replace('{profile_id}', $aProfile['id'], $sUrlProfileAction) : BxDolPermalinks::getInstance()->permalink('page.php?i=account-profile-switcher', array('switch_to_profile' => $aProfile['id'], 'redirect' => 'profile'))
-
·
LeonidS