I would like to be able to replace all the contents in a template using the Create Template Modification system, is this possible?
Hi Chris,This should work:
Yes it appears the TM system would require two modifications to do want I want.The XenForo TM system only operates on the Master Style. It isn't style specific.
So, once again, editing the templates is going to be much simpler, flexible and upgrade friendly.
When I'm editing a template in the Default Style, there's a check box with the following message:The XenForo TM system only operates on the Master Style. It isn't style specific.
Bear with me here, stumbling through thisI think you might need to start from the beginning in terms of the new features in XenForo 1.2.
You're absolutely right that manual template edits aren't great and actually can make life very difficult.
However, XenForo 1.2 includes an excellent new system for handling outdated templates. Let's say, for example, that you added a completely new line of code to a template and XenForo also modifies the template and you do an upgrade.
There will of course be an outdated template. But the difference is, you have the option to go to "Merge Changes".
In Merge Changes, it will show you all of the differences between your version of the template and the new XenForo version.
Look at this screenshot:
View attachment 51903
The two lines of code highlighted in yellow are where the XenForo version (parent) differs from the custom version (your own edit).
You get given a very simple choice:
1) Use the parent version and remove your custom changes.
2) Keep your custom version.
3) Keep both versions (this will probably not be a common choice for most things).
To give you an extra level of control, after you have selected one of the options you can actually edit the text directly (maybe you want to add more, or leave yourself a comment or something).
View attachment 51905
Finally, note the area in blue? Quite simply this is a custom edit you've made that has automatically merged itself, e.g. there's no conflicts. All you need to do is double check that you still want the custom change. If you don't, you can actually click to edit it or remove it.
Finally, click Merge Changes. Job done.
The benefits are:
The point I'm trying to make is: It's now easy to make template edits.
- It's easy to see what's changed in the XenForo template.
- It's easy to see what you've added to the XenForo template.
- It's easy to choose what action to take if some of the code conflicts.
- It's easy to allow it to automatically merge changes.
- It's easy to make further customisations.
I urge you and everyone else. Do not be scared of making template edits anymore. There's an incredible amount of change control.
Even if you do all this and realise you've made a massive mistake and merged a load of stuff you shouldn't, you can just use the template history:
View attachment 51906
This is all detailed here: