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.

Template Questions /

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

Forgotten Password Template Problem


Go to End


5 Posts   5526 Views

Avatar
nimeso

Community Member, 17 Posts

2 September 2009 at 9:44am

Hi All,

Firstly, Thanks for such a great product... lovin it!

I'm quite new to SS and have just finished my first simple site but I have a problem with the 'Lost Password Page'.

Because the lost password url is something like http://testsite.tko/Security/lostpassword. My sub menu is showing up... following?

see attached screen

my menu code looks something like:

<% if Menu(2) %>
<div class="oneCol leftMenu">
<ul>
<% control Menu(2) %>
<li class="$LinkingMode"><a href="$Link" title="Go to the &quot;{$Title}&quot; page">$MenuTitle</a>
<% if LinkOrSection = section %>
<% if Children %>
<ul>
<% control Children %>
<li class="$LinkingMode"><a href="$Link" title="Go to the &quot;{$Title}&quot; page">$MenuTitle</a></li>
<% end_control %>
</ul>
<% end_if %>
<% end_if %>
</li>
<% end_control %>
</ul>
</div>
<% end_if %>

How do I stop the menu showing?

Thanks heaps

Jamie

Attached Files
Avatar
baba-papa

Community Member, 279 Posts

2 September 2009 at 11:29pm

Hello Jamie,

I think that the method "lostpassword" is redered with the Page.ss template. You can create a template that will be applied if the "lostpassword" method is called.
1. Copy the Page.ss template
2. rename the copy Page_lostpassword.ss
3. Change the template code of Page_lostpassword.ss

I hope that will work ;)

Roland

Avatar
mschiefmaker

Community Member, 187 Posts

20 October 2009 at 8:35pm

So I have created a lost template which applies but I have lost it contents i.e. I no longer see

Enter your e-mail address and we will send you a link with which you can reset your password

Email ...

I have tried calling $LostPasswordForm i.e.

<div class="typography">
<div id="Content">
<h5>$Title</h5>
<div id="Surround">
$LostPasswordForm
</div>
</div>
</div>

What should it be?

Thanks

Catherine

Avatar
socks

Community Member, 191 Posts

20 October 2009 at 9:36pm

Edited: 20/10/2009 9:37pm

This is all I have in my custom template for the Lost Password page. (if you wanted to customize your login page, it would be Security_login.ss)

Security_lostpassword.ss

<div id="content-body">
    <h1 id="page-title">$MenuTitle.XML</h1>
	$Content
        $Form
</div>

Avatar
mschiefmaker

Community Member, 187 Posts

21 October 2009 at 7:11am

Doh!

Too busy looking for something complex, forgot the basics!!

thank you, much appreciated

Catherine