API Questions on Kentico API.
Version 5.x > API > use current page path macro in "SignOUt" webpart View modes: 
User avatar
Member
Member
mj-y - 8/21/2013 6:22:58 AM
   
use current page path macro in "SignOUt" webpart
I have a "sign out" web part and want to use current page path in "Redirect to URL". which macro should I use?
thx in advance

User avatar
Kentico Support
Kentico Support
Accepted solutionAccepted solution
kentico_filipl - 8/21/2013 7:27:16 AM
   
RE:use current page path macro in "SignOUt" webpart
Hi,

You can use the following macro to retrieve current document's path for assigning it to Redirect to URL property:
~{%cmscontext.currentdocument.nodealiaspath%}.aspx

Best regards,
Filip Ligac

User avatar
Member
Member
mj-y - 8/22/2013 1:40:33 AM
   
RE:use current page path macro in "SignOUt" webpart
thanks, it works fine for not authenticated required pages... but when I want to sign out from an authenticate required page (like user profile) it goes to this link that is not right:
http://localhost:10351/KCMS/Logon.aspx?ReturnUrl=%2fKCMS%2f%D8%B5%D9%81%D8%AD%D9%87-%DB%8C-%D9%85%D9%86.aspx

and the eror is "The resource cannot be found."

how can I lead user to Home.aspx when he sign out from an authenticated required page?

User avatar
Kentico Support
Kentico Support
kentico_filipl - 8/23/2013 3:16:28 AM
   
RE:use current page path macro in "SignOUt" webpart
Hi,

To redirect a user to a specific site after signing out, you need to set Redirect to URL property of a Sign out button web part to ~/Home.aspx for instance.

Best regards,
Filip Ligac