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

XF 1.4 Add a button

upnet

Active member
#1
I'm thinking to add a button that is a link to a page in my sidebar. I would think a simple solution would have it be the same as the "Sign Up Now" button. How could I duplicate another button below "Sign Up Now" that simply has different text and a link to somewhere else?
 

Amaury

Well-known member
#2
Copy the code of the Sign Up Now! button in the respective template and place it below the existing code, adjusting it to suit.
 

upnet

Active member
#3
Logical concept. Not sure exactly how to implement. The code I see (sidebar_visitor_panel) looks like:

Code:
<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>
 

upnet

Active member
#5
Ok, can I put a URL in the href="" and then get rid of the IF. And simply use the existing Label? Example:

Code:
<label for="LoginControl" id="SignupButton"><a href="http://myboard.com/gohere/" class="inner">Go Here</a></label>
 

Amaury

Well-known member
#6
Ok, can I put a URL in the href="" and then get rid of the IF. And simply use the existing Label? Example:

Code:
<label for="LoginControl" id="SignupButton"><a href="http://myboard.com/gohere/" class="inner">Go Here</a></label>
Give it a try; if it doesn't work, revert the template.
 

upnet

Active member
#8
That was the basic solution. I had to take it out of the bigger IF that toggles between the registration button and the logged in member info. I also had to include the class for secondary content. Thanks for the confidence to try Maru :)