SaaS CMS has officially launched! Learn more now.

Use different login page


Is it possible to replace the standard EPiServer login page, ideally on a per-page basis?

 Part of my page tree should be available to a certain group of users (but not to group Everyone) and I want to redirect users not logged in to a login page I designed myself when they try to access these pages (but not all "protected" pages on the site, or edit/admin mode).

Jun 12, 2008 9:54

The public sample package uses a special page template for the login page and a dynamic property do reference it.

If you'd want different login pages for different parts of the site you could simply change page reference in the dynamic property for that node. And if you'd want to use the original login page for a certain node, you could set the reference to the startpage and check for that when generationg your link.

Please see the public package for further details.

Jun 13, 2008 9:13

Thank you for your reply!

However, I don't think it solves my problem. To clarify, what I want to do is replace the login form shown when the user is linked to a page where he/she has insufficient permissions to read, i.e. not a login page that the user "voluntarily" chooses to go to.

For example, say I create page called Partners somewhere in my page tree, and assign it the simple address /partners. I set permissions for this page to exclude read access rights for group Everyone, and give read access rights to my Partners group. If someone accesses myhost/partners he/she whould get the standard EPiServer login page, but I want a different page for the Partners section - a page where I for example would include a possibility to register a new partner account.

In case it makes any difference, I am using CMS 4.62.

Jun 16, 2008 8:14

There is a login.aspx file in your templates folder. Change your web.config file to point to this instead:

    <authentication mode="Forms">
      <forms name=".EPiServerLogin" loginUrl="templates/login.aspx" />

You can change the layout of the login.aspx page as you'd like. But, you can only have one of these (web.config can only point to one file.) To get around this, check the return url query string parameter from your code before you show the UI in you login page, and hide/show panels according to your needs.

Beware of triggering AccessDenied exceptions in your login page though. Could get ugly really quickly. :-)

Jun 16, 2008 9:30
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.