Support Resolved Replace Tournament background

toodlez

Member
Joined
Jul 3, 2016
Messages
43
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?
 

MtoR

Freaky Coder
Staff member
Joined
Nov 14, 2015
Messages
3,904
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.
 

MtoR

Freaky Coder
Staff member
Joined
Nov 14, 2015
Messages
3,904
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.
 

toodlez

Member
Joined
Jul 3, 2016
Messages
43
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.

<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
 

MtoR

Freaky Coder
Staff member
Joined
Nov 14, 2015
Messages
3,904
As I said I am unsure of the availabilty of $tournament there.
 

toodlez

Member
Joined
Jul 3, 2016
Messages
43
you guys built the add-on shouldn't you have answers to questions if they work or not lol
 

MtoR

Freaky Coder
Staff member
Joined
Nov 14, 2015
Messages
3,904
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