XF 2.2 Template modification not applied except if...

I add this in the extra.less template
Less:
.bg-ug1 {
    background: {$xf.options.bgColorUserGroup1};
    border-left: 3px solid {$xf.options.borderColorUserGroup1};
}

Is it the template modification not automatically applied when i edit the value of {$xf.options.bgColorUserGroup1} for example because it's an add-on option and not an add-on style property ?
 
Is it the template modification not automatically applied when i edit the value of {$xf.options.bgColorUserGroup1} for example because it's an add-on option and not an add-on style property ?
A template modification is applied before the template is saved.
If you modify an option this will not trigger a template save process nor will it invalidate cached CSS (neither server nor client side).
(Unless you add specific PHP code to do so).

TL;DR Don't use options for style settings, use style properties.
 
Thanks, that's what I was figuring out.

I'm not able to create anything with PHP so I have to adapt.

What was interesting with the options is that I easily created with PHP Callback a drop-down menu with the different user groups. With the style properties I don't have this possibility and therefore I have to create a numeric field in which the users will have to indicate the usergroup iD with which they want to interact, which is much less user-friendly.
 
Maybe i can do it with admin template ?
How could i propose usergroup drop-down menu for a style property ?

Thank you.
 
Top Bottom