• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.3 Login/Register URL

JamesBrown

Well-known member
#1
As a guest if you click on Sign up Now! button on the home page then the regular sign up form drops down from the top. Looking at the URL its http://www.motorhomefun.co.uk/forum/login/

When I put this URL as a link in a notice it does not trigger the drop down sign up form, rather it takes me to another login page. How can I get this link in a notice to work the same as the Sign up Now Button and trigger the dropdown login form? Thanks
 
Last edited:

Chris D

XenForo developer
Staff member
#2
Give the link or other element a class of "LoginControl", e.g.

Code:
<a href="{xen:link login}" class="LoginControl">Log in</a>
 

JamesBrown

Well-known member
#3
Thanks @Chris D

The code now reads
Code:
<a href="login" class="LoginControl">Register Now</a>
but still defaults to a log in page rather than triggering the drop down log in menu.

written as
Code:
<a href="{xen:link login}" class="LoginControl">Log in</a>
No file found
 
Last edited:

Russ

Well-known member
#4
Thanks @Chris D

The code now reads
Code:
<a href="login" class="LoginControl">Register Now</a>
but still defaults to a log in page rather than triggering the drop down log in menu.
This is how the sign up button does it:

Code:
<div class="section loginButton">     
   <div class="secondaryContent">
     <label for="LoginControl" id="SignupButton"><a href="{xen:link login}" class="inner">{xen:if $xenOptions.registrationSetup.enabled, {xen:phrase sign_up_now}, {xen:phrase log_in}}</a></label>
   </div>
</div>
Specifically in the label part, the for="LoginControl" would cause the pull down.