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

XF 1.1 Better to Make New Style a Child or Standalone?

Discussion in 'XenForo Questions and Support' started by Mr_Bob, Nov 20, 2011.

  1. Mr_Bob

    Mr_Bob Well-Known Member

    Quick question to make sure I'll save myself a serious headache down the road. I'm developing a new style in a test installation of XF. My goal is to export the style and import the style into my live installation. Now, here's the question, should I make the style a child of the default style, or can I simply make it its own standalone style? Basically, would upgrades to Xenforo templates take affect on my standalone style (asking to overwrite templates during the upgrade if necessary) or do upgrades only affect the default Xenforo style, so I would need to edit everything in (headache). Does it not matter what I do?

    I feel a bit embarrassed, this is really something I should know, but better safe than sorry!
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Personally I would make it a top level (parent) style and not as a child of the default.
    You can then get rid of the default style, which makes for faster template compiling with just a single style.

    After an upgrade, any outdated templates will be marked as such; you just need to revert them and reapply your edits.
    All other templates will be updated accordingly automatically.
     
    Mr_Bob likes this.
  3. Floris

    Floris Guest

    For one reason in 1.0 and 1.1: Export.

    You can't export a child style in XenForo and have the parent's customizations included. You would have to export both, in order to restore it somewhere else.

    If you just have a few alternative situations, sure, go for it. But if you have a core parent style, with a handful or more child styles that are unique in their own way. The stuff from the 'core' that's creating the consistency between the styles won't be included then.

    For that reason alone I would always made parent styles. More complete when you back up .. and more complete when you restore.
     
    Mr_Bob likes this.
  4. Blue

    Blue Well-Known Member

    I am now using 1 custom parent style for my forum. So, I have my custom style and the default style. Should I delete the default style or does it make any difference to leave it in place?
     
  5. Brogan

    Brogan XenForo Moderator Staff Member

    Having two styles takes longer to compile templates when installing add-ons and upgrading.

    If you're not using it, there's no reason to keep it.
     
    Blue likes this.
  6. Morgain

    Morgain Well-Known Member

    I don't get it.
    If you're going to copy the default style, rename it, then customise it - and delete the original default style
    then why not just edit the original?
     
  7. Blue

    Blue Well-Known Member

    It's a live, active site.
     
    Morgain likes this.

Share This Page