XF 2.3 Variation Template Conditionals?

Mushpoie

Member
Hi,

I would like to create a theme based off the default theme but want to use a template conditional for differences between the variations in extra.less.

Does anyone know the new template conditionals for the new theme yet or attempted this?

Thanks in advance.
 
Solution
You'll likely want .m-colorScheme(...):
If your saying you only want some changes in the child style via extra.less, by applying them in the child style they will not affect the master.
Or did I miss understand the question?
 
In the extra.less you can specify templates as shown below. This is only an example.
Code:
// *** Link Colors ***
[data-template="Template_Name"]
{
    .block.??_page a:link
    {
        color: #4170cf;
        text-decoration: none;
    }
    .block.!!!-page a:visited
    {
        color: purple;
        text-decoration: none;
    } 
    .p-body-main a:hover 
    {
        text-decoration: underline;
    }
}
 
Here's what I am talking about:
Code:
<xf:if is="{$xf.style.getAlternateStyleType()}">
.p-staffBar {
background:#FF0000 !important;
}
</xf:if>

This ignores the alternate style regardless the setting, when it should only effect the alternate.
 
As far as I know, styles cannot be specified.
That is handled by the hierarchy.
Master controls child.
If you want the child different you have to change each child.
The style is assumed by the one you select when editing.
 
You'll likely want .m-colorScheme(...):
 
Solution
You'll likely want .m-colorScheme(...):
Shoot, forgot to ask what XF version!
 
Back
Top Bottom