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

Using the "Sign Up Now!" Button in a Notice

toodlez

Active member
#1
How do I put the "Sign Up Now!" Button into a notice (as well as keep it in the visitor side bar

Thanks!

I simply copied and pasted the code from the sidebar template but it was all messed up in the notice it showed everything in the link tag as the text on the button
 

Jake Bunce

XenForo moderator
Staff member
#2
Notices don't have access to the same template functions and container params. Use this code in your notice:

Code:
<label for="LoginControl" id="SignupButton"><a href="index.php?login" class="inner">Sign Up Now!</a></label>
The link and language is hard-coded.
 

toodlez

Active member
#3
Very nice thank you Jake... had to tweak it a bit to suit my new things I implemented with my sign up / login system... But it is working!
 

erich37

Well-known member
#4
I have just tried this, but I am having an issue with the width of the "Sign Up Now"-button.
The button has the width of nearly the notice.

What is the best way of decreasing the width of the button in the notice ?


Many thanks!
 

erich37

Well-known member
#6
one more question please:

is there actually a difference where I put the "slash" for the link (before the word "login" or after the word "login" or both) ?

Code:
<label for="LoginControl" id="SignupButton" style="display: block; width: 170px;"><a href="login/" class="inner">Sign Up Now!</a></label>
Code:
<label for="LoginControl" id="SignupButton" style="display: block; width: 170px;"><a href="/login" class="inner">Sign Up Now!</a></label>
Code:
<label for="LoginControl" id="SignupButton" style="display: block; width: 170px;"><a href="/login/" class="inner">Sign Up Now!</a></label>


I am asking because at some other code (for linkling to the Register-page) I do have the "slash" at the beginning (in front of the word "register"), for example like this:

Code:
<a href="/register">Sign up to become a Member</a>

So I am wondering where I should put the "slash" for the Link ?


Thanks!