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

XF 1.1 Style and template question

Discussion in 'Installation, Upgrade, and Import Support' started by Ramses, Nov 28, 2011.

  1. Ramses

    Ramses Member

    If I upgrade a style are templates or style components overwritten?
    How does it work if there are changes, don't find a view to compare original and changed template or style component? Thanks.
  2. Brogan

    Brogan XenForo Moderator Staff Member

    What are outdated templates and why do I need to revert them? Can't I just continue using the old ones?
    If a template is changed between releases, i.e. from 1.0.0 to 1.0.1, and you have manually edited it, then it will be marked as outdated. This is done because the software doesn't automatically overwrite those templates, thereby causing certain functionality which you have added to be lost. It is an indication that the core code has changed and you need to take action. The software will continue to function with these outdated templates but you may be missing important updates and bug fixes so it is recommended to revert and reapply any edits.


    You will need to manually revert and compare/reapply changes to templates.

    Style Properties are never overwritten during an upgrade.
  3. Ramses

    Ramses Member

    Thanks for the link Brogan, but there is no answer where I can see the original content of a changed template or style component without reverting first.
  4. Brogan

    Brogan XenForo Moderator Staff Member

    That's correct, as I explained above, modified templates aren't automatically overwritten.

    Create a default style if you want to refer to the original templates and style properties.
    Ramses likes this.
  5. RobParker

    RobParker Well-Known Member

    It seems the best way to handle this is to create a child style and only every apply your edits on that. If something changes in the original style, you can just update it but your changes to the child style file should stay intact.

    There might be some cleaning up to do (say if you edited something in the child that then changes when the parent is updated) but if there is you at least still have the child style with all the changes and can easily create a new child style and re-apply them.
    Ramses likes this.
  6. Brogan

    Brogan XenForo Moderator Staff Member

    That's not necessarily true.

    I don't have a default style on my site; I have one parent style to which all edits are applied.
    I then have a child style which has a few minor changes to make it slightly darker.

    There's no specific requirement to keep a copy of the default style.

    If you have outdated templates after an upgrade, just revert and reapply any changes.
  7. RobParker

    RobParker Well-Known Member

    Sorry what I meant was that when your parent style is updated it can be quite difficult to reapply all of the edits. However, if you make the edits in a child style, they should all still exist after you update the parent and you won't need to revert and reapply them unless they specifically affected bits in the parent that have changed.

Share This Page