• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.2 How do I make template changes that will affect all styles?

Lone Wolf

Well-known member
#1
I have 3 styles installed and I'm thinking of increasing this to 5 styles when I upgrade to 1.2

However there are a few template edits which I make in every style, these edits are to the same same template and are the same edits in each style. For example a sticky seperator, extra menu options, etc.

Is there a way I can make these edits in one place where it will affect all the styles. This would make things a lot easier and less time intensive.

Can it also be done for style properties too?
 

Brogan

XenForo moderator
Staff member
#2
The only way it can be done is by making the other two styles children of the parent style.

Then any changes will be inherited, unless the child styles themselves have modified those templates or SPs.
 

Lone Wolf

Well-known member
#4
The only way it can be done is by making the other two styles children of the parent style.

Then any changes will be inherited, unless the child styles themselves have modified those templates or SPs.
Yes but wont that mean the child styles inherit the parent style. Sounds like a mess since Flexile already uses itself as a parent style so i would be having 3 layers of styles.

Then better use Template Modification, enable debug mode first. That's what i did since XenForo intruduce it.
That sounds interesting, how do I do that?
 

Lone Wolf

Well-known member
#9
I clicked on Template modifications but there is no create new template modification option. Do I have to be in debug mode?
 

katsulynx

Well-known member
#13
yourpage.com/admin.php?template-modifications/add gives you direct access and the possibility to create modifications even when not in debug mode.
 

Lone Wolf

Well-known member
#17
Ok I've run into an issue. I wanted to remove the staff online box across all styles by adding the following to extra.css

Code:
.sidebar .staffOnline {
  display: none;
}
But it doesn't work unless it's finding and replacing text. You cant use it to add some code to a specific template in all styles.