Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Website logon page URL/Macros View modes: 
User avatar
Member
Member
AlexQMN - 11/21/2011 10:37:12 AM
   
Website logon page URL/Macros
Hello,

I have a Question on specifiying the Logon-Page that is called after a unauthenticated User tries to access a secured Page.

I would like in that case to reload the current page with an added querystring parameter
i.e. if current page is ~/Home.aspx, it should end up like ~/Home.aspx?openLogin=1&ReturnURL=*requested page*.

I tried playing around with the Website logon page URL Setting in Site Manager, but i guess Context Macro doesnt work there. Do you maybe have any Tips how to achieve this, if it is possible at all (with Configuration).

Thanks,
Alex

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 11/22/2011 1:26:01 AM
   
RE:Website logon page URL/Macros
Hi,

This is the default behavior of the logon form web part and no additional settings are required. Are you having any issues with this? If so, could you please describe it in details?

Best regards,
Juraj Ondrus

User avatar
Member
Member
AlexQMN - 11/22/2011 6:33:59 AM
   
RE:Website logon page URL/Macros
Hi Juraj,

Basically im looking for the easiest way to do this:
I would like to add an additional querystring Parameter to the Request-URL when the "Logon Page" is automatically called from KenticoCMS due to a secured Page.

So i tried to define in CMSSiteManager->Settings->Security->Website logon page URL something like this: "~/Home.aspx?param=xxx".

But the resulting URL when the Logon-Page is called is
"~/Home.aspx?param=xyz?ReturnUrl=xyz"

when i would like it to be:

"~/Home.aspx?param=xyz&ReturnUrl=xyz"
OR
"~/Home.aspx?ReturnUrl=xyz&param=xyz"

Regards,
Alex

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 11/24/2011 1:53:37 AM
   
RE:Website logon page URL/Macros
Hi,

In this case you will need to change the code little bit to achieve your needs.

In case you want to do it for the user interface, you need to change the behavior of /CMSPages/logon.aspx.cs file - there you can find the way how the ReturnUrl query string parameter is added to the URL so you can add your custom parameters here.

If you want to do it for the log on page to your site - I guess you are using the Logon form web part. In this case you need to do the same modification as above in \CMSWebParts\Membership\Logon\LogonForm.ascx.cs file.

Please, mark these changes to be aware of them when upgrading/hotfixing since the default files can be overwritten back to defaults.

Best regards,
Juraj Ondrus