1. 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

Discussion in 'Styling and Customization Questions' started by upnet, Nov 27, 2014.

  1. upnet

    upnet Active Member

    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?
     
  2. Amaury

    Amaury Well-Known Member

    Copy the code of the Sign Up Now! button in the respective template and place it below the existing code, adjusting it to suit.
     
  3. upnet

    upnet Active Member

    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>
     
  4. Amaury

    Amaury Well-Known Member

    If you wanted to link to the members page, for example, instead of xen:link login, you'd use xen:link members.
     
  5. upnet

    upnet Active Member

    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>
     
  6. Amaury

    Amaury Well-Known Member

    Give it a try; if it doesn't work, revert the template.
     
  7. upnet

    upnet Active Member

    Thanks for the replies Maru. I don't have a test site, can anyone advise on this code addition?
     
  8. upnet

    upnet Active Member

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

Share This Page