How to show link to all users but access only to members?

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
6/27/2009 6:57:29 AM
Gravatar
Total Posts 3

How to show link to all users but access only to members?

 I have a scenario here:

1) I want to show a link for a page to ALL USERS in menu. But they should log in before they can access that page content. So, it should be like whe the user clicks on the link, the system should take him to the log-in page and then as soon as the user logs in, he should be redirected to the page link he clicked.

2) I know that this functionality can be achieved using 'MemberPages' folder in asp.net. I want to know the process in mojoportal. Can anybody help.

Thanks in advance.

Maahi

6/27/2009 10:06:12 AM
Gravatar
Total Posts 18439

Re: How to show link to all users but access only to members?

Hi,

First create the page that you want to be accessible by members only. Lets say the page is named Foo and it has the url /foo.aspx and you set the view permissions on this page to the role "Authenticated Users"

Now the page exists but it is not in the menu if the user is not authenticated because the view roles filter for that.

Next create another page named Foo, check the box that says "Hide From Authenticated" Users in page settings and keep the view roles as "All Users". Set the Url for this page to the fully qualified url of the previously created page, ie http://yoursiteroot/foo.aspx

This should achieve your stated goal. There will be a link in the menu visiable to unauthenticated users but when the user clicks it he will be prompted to login and after login he will be redirected to the page. Now that he is logged in the previous page link dissappears because it has hide from authenticated and the previously hidden page appears because the user is signed in.

Hope it helps,

Joe

You must sign in to post in the forums. This thread is closed to new posts.