Master Style

Peggy

Well-known member
Probably already been asked, but I can't find it.

How do you create a "master style"?
Would this be the style where you note all of the edits to your customized style so that you can reapply them?

Never having done this, I'm rather confused.
 
Probably already been asked, but I can't find it.

How do you create a "master style"?
Would this be the style where you note all of the edits to your customized style so that you can reapply them?

Never having done this, I'm rather confused.
The Master Style (style_id = 0) is the uneditable master copy that gets updated by developers. It's not intended to be manipulated by administrators. It's always there, but normally it's hidden unless you're running in debug mode.

Note that any changes made to the master style will be instantly wiped out as soon as you run a XenForo upgrade script.
 
ahha so this is something that I don't need (or want) to do, not being a developer, right?
You want to leave it well alone
thumbsup.png
 
Note that any changes made to the master style will be instantly wiped out as soon as you run a XenForo upgrade script.
I updated another theme and that wiped out my templates as well. I used the overwrite option. These were totally new templates that didn't go with the theme. How should we save our templates?

Luckily it was only three templates and I can redo them fairly easy. Trying to get the hang of this while building the new forums.

Edit: Plus when I make mods I put them in the master style. What should I do with them. I know in vB we had to install mod templates in the master style of they would not be included in the export.
 
I updated another theme and that wiped out my templates as well. I used the overwrite option. These were totally new templates that didn't go with the theme. How should we save our templates?

Luckily it was only three templates and I can redo them fairly easy. Trying to get the hang of this while building the new forums.


Edit: Plus when I make mods I put them in the master style. What should I do with them. I know in vB we had to install mod templates in the master style of they would not be included in the export.
There are two questions to answer here:

1) Save your template customizations in non-master styles.

2) Add-ons should add their templates to the master style but they must use an add-on ID that is not XenForo, or they will be overwritten by the XenForo upgrade process.
 
There are two questions to answer here:

1) Save your template customizations in non-master styles.

2) Add-ons should add their templates to the master style but they must use an add-on ID that is not XenForo, or they will be overwritten by the XenForo upgrade process.
Thanks for the quick reply.

One last question. Any idea why the templates I made were removed when I updated my style from the RC2 to the RC3 version of the style?
 
One last question. Any idea why the templates I made were removed when I updated my style from the RC2 to the RC3 version of the style?

I assume the missing templates were part of the master style and got overwritten by the upgrade process. Or you overwrote the style containing those templates when importing the new style:

Admin CP -> Appearance -> Import a Style -> Overwrite style
 
Well that is how you upgrade a style sure. I didn't think it would remove/overwrite any templates that did not have the same name. So if I use a style from here and make custom templates for pages for my site, Then upgrade said style and it removes the custom templates. So every upgrade I have to recreate the templates. Thats a pain in the you know what.
The software should leave any extra templates that have nothing to do with the software alone. It should not remove then for every upgrade.
 
It's an overwrite, not a merge.

For your situation you can use parent / child styles to separate your custom templates from the main style. For example, if you create a new style to contain your custom templates and then upload the custom style as a child of that style, then the custom style will inherit all of the custom templates from the parent. And those custom templates would not get overwritten when you overwrite the custom style with a newer version of itself because they are contained in the parent style which is separate.
 
But if the new templates have nothing to do with any style they should get left alone no matter what. I shouldn't have to rebuild my site for every upgrade. I shouldn't have to create a new style for every upgrade. By 2012 my template id would be 50. As of now my template id would be somewhere around 9. Thus why I always overwrite. I have three styles the Master Style, The Default style(Not selectable), Then the site I use for the site. So your saying I should make yet another style as a child style? Then I would have to keep two styles updated for every upgrade. No thanks!!!

When I build my site I build it inside of xenForo template system to make using the css much easier. I can not put my custom templates in the master style cause they get removed. I can put them in a style downloaded from here cause they get removed on style upgrades. So where do i put them?
 
But if the new templates have nothing to do with any style they should get left alone no matter what.

That might be a good feature suggestion... allowing style merges. But right now the system only supports overwriting an existing style, not merging with it.

I shouldn't have to rebuild my site for every upgrade. I shouldn't have to create a new style for every upgrade.

You don't have to. You can avoid the problem of losing your custom templates by using parent / child styles.

So your saying I should make yet another style as a child style? Then I would have to keep two styles updated for every upgrade. No thanks!!!

Just one new style which will be a parent to your custom style. The parent will contain your custom templates. This does not cause more work later. It actually reduces the amount of work because no longer will you lose your custom templates when you update your custom style.

When I build my site I build it inside of xenForo template system to make using the css much easier. I can not put my custom templates in the master style cause they get removed. I can put them in a style downloaded from here cause they get removed on style upgrades. So where do i put them?

Don't put your custom templates in the master style. Create a new style and use it as a parent to your custom style.
 
Top Bottom