1. This area is dedicated to the support of our xF2 add-ons, for support of our xF1 add-ons please use the dedicated forums.
    Note that we only accept support question and bug reports in this section.

    For suggestions, please wait until xF2 stable is released as we'll reorganize our forum at that time and accept them.
Dismiss Notice
We have just posted about our product policy for XF2.
Click HERE to view it.

Tournament Replace Tournament background

Discussion in 'Add-Ons Support' started by toodlez, Nov 4, 2018.

  1. toodlez

    toodlez Member

    Joined:
    Jul 3, 2016
    Messages:
    43
    Likes Received:
    0
    What would I need to place with a conditional in the css in extra.less to replace the background image of the page based on the tournament ID?
     
  2. MtoR

    MtoR Freaky Coder
    Staff Member

    Joined:
    Nov 14, 2015
    Messages:
    4,570
    Likes Received:
    706
    We have no class in the tournament template that has the tournament id.
    Perhaps having some conditions based on the $tournament variable but I am unsure if it's accessible in extra.less.
    You could try.
     
  3. toodlez

    toodlez Member

    Joined:
    Jul 3, 2016
    Messages:
    43
    Likes Received:
    0
    do you have a starting point you can provide me?
     
  4. MtoR

    MtoR Freaky Coder
    Staff Member

    Joined:
    Nov 14, 2015
    Messages:
    4,570
    Likes Received:
    706
    Something like that:
    Code:
    <xf:if is="{$tournament.tournament_id} == your_id">
    .tournamentBody-main {
    your css code here
    }
    </xf:if>
    
    But not sure that will work.
     
  5. toodlez

    toodlez Member

    Joined:
    Jul 3, 2016
    Messages:
    43
    Likes Received:
    0

    <xf:if is="$tournament.tournament_id == 16">
    .p-pageWrapper {
    background: #111 url('my url here') !important;
    }
    </xf:if>

    this is what I did, no luck
     
  6. MtoR

    MtoR Freaky Coder
    Staff Member

    Joined:
    Nov 14, 2015
    Messages:
    4,570
    Likes Received:
    706
    As I said I am unsure of the availabilty of $tournament there.
     
  7. toodlez

    toodlez Member

    Joined:
    Jul 3, 2016
    Messages:
    43
    Likes Received:
    0
    you guys built the add-on shouldn't you have answers to questions if they work or not lol
     
  8. MtoR

    MtoR Freaky Coder
    Staff Member

    Joined:
    Nov 14, 2015
    Messages:
    4,570
    Likes Received:
    706
    No it's a question of how xF2 put the variables in the templates.
    My thinking was that it's not.

    In that case, I think you would need to put some <style></style> in the tournament view template based on tournament id.
    With a !important on the background to ensure it overrides.

    Clément
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice