Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

login window inside a site page


Go to End


4 Posts   2115 Views

Avatar
bebabeba

Community Member, 193 Posts

29 November 2008 at 6:40am

Hi!
I want create a login window inside a page of my site. When I log I can see all the site with more 2 page. I try to use login widget but when I load it, this module say tha i login yet. So it' is link to the beginning login to cms. Is there a way to modify thos widget, or ohter way to implemen login? I thoght forms but I'm not able to redirect correctly to my pages.
Hav you got some idea?

Avatar
Liam

Community Member, 470 Posts

29 November 2008 at 7:07am

I'm a little confused by the post, but you can edit the hidden input field to set the redirect to any page you want. I generally find this the quickest way to deal with the login form.

<input type="hidden" id="backURL" name="BackURL" value="/some-page/" >

You can find this in the form html, or add it.

Avatar
bebabeba

Community Member, 193 Posts

1 December 2008 at 8:44pm

Sorry for my bad english..
I try to explain better. Inside home page I want a login form reserved to a particular user that can see other to reserved page of my site (a normal user can't see these two pages). I try to do this through login widget. the problem is that login widget seems likn to login module to enter in my cms so if I try to implement this it saies me that I login yet.
My question is: I must create 2 new form for my login without the use of login widget?
Thanks!

Avatar
bebabeba

Community Member, 193 Posts

1 December 2008 at 10:15pm

ok, I try a solution, can you hel me to write bettere what I want to implement?
I create form as explain in tutorial 3. Whwn I clic in login button I implement a function that return 1 if the user is my privileged user, 0 in the otherwise.
Now in my navigation menu(1) i want to recall this function and if the function return 1 I want a cicle in menu(1) to see homepage page2 page3, if return 0 I want see in my menu only homepage. Can you help me to write this function wuth silvertstripe?is very difficult form me..