XF 2.0 Merging Style templates by default

VG_AzR

Active member
Hello, I want to create my own style based on the default part style.

So I have the XML of it and then export the XML to not work on the basic version of Xenforo.

Must my new style be a child of the default style?
If it is time when children will the templates merge automatically?
 
I'm going to create a theme from the BASE theme "default"? so I have to export the XML from the theme, and then import the XML to avoid touching the base style. Oh, unless I can work on the "default" style?

In case I import the XML, I have to import it as a default child style so that when there is a XF update all the templates merge directly without having to do it manually ?
 
All you have to do is click "add style" at the top right. All new themes are based off the default style. You don't need to edit the only default style there is.

Your core code edits need to be in the parent and small customizations like in extra.less need to be in the child (since your creating the theme).

I recommend making a new template and adding the reference to "app.less" which if you go to that file you'll see how to add a .less template reference towards the bottom. Do that and it will display, then put your small customizing in extra.less

That's what I did when I made my style. My sites running on a custom style I made built off the default style right now if you want to check it out.

When you import an xml file for a style you need to overwrite the parent and the child customizations remain. Overwriting the parent with new parent versions won't affect the child. You just merge the templates and only the parents changes will be applied.
 
No need to have a child style if you’re basing it off of the default style. There is a hidden Master style that the “default style” is inheriting values/colors/ect from. When an update comes along you can merge any changes if any by viewing the Outdated templates link in the sidebar.

Just rename your current “default style” to whatever you want and starting customizing, add any additional CSS to the extra.less template.
 
Default style.

You can always create a new “Default style” by clicking the Create style button on that page, it will recreate it using the hidden Master style. Hope that makes sense.
 
Yes I think I understood, so I can remove the style default 2.0 (which is only the export / import of the default style XML file) and create a style as you just explained.
If I follow your explanation at the next update XF templates will automatically merge?
 
Default style.

You can always create a new “Default style” by clicking the Create style button on that page, it will recreate it using the hidden Master style. Hope that makes sense.

^ The master style isn't viewable unless debug mode is enabled. And it's not necessary to use it to create styles. You can if you want but not necessary.
 
Yes I think I understood, so I can remove the style default 2.0 (which is only the export / import of the default style XML file) and create a style as you just explained.
If I follow your explanation at the next update XF templates will automatically merge?

You don't need to remove default 2.0, just click create-style and make a new one. All newly created styles are the default style.
 
So I work and apply my template changes directly to default style

That's what you'll be doing on your new style after you create it yes. You apply the default changes by overwriting the parent, regardless of if there's a child. If you want to add a child that's up to you. Your always welcome to edit the only theme showing (default 2.0) but you can just as easily click "create style" and then edit the "new default style"
 
^ The master style isn't viewable unless debug mode is enabled. And it's not necessary to use it to create styles. You can if you want but not necessary.
Basically why I say “hidden”. You’re confusing this more than it needs to be.

I just want to create a style based on the default style and that when MAJ XF templates merge directly without me having to do it manually
Your current “Default style” will likely work. Did you create the “Default 2.0” style we see in the picture?
 
Back
Top Bottom