Best practice for customizing the theme
Permalink Browser Info Environment
What process/setup do you recommend for sites that require intensive CSS customization and possibly markup changes that leaves the package relatively untouched for upgradability? Is that possible, or do I just need to edit the package?
Thanks,
Tim
Thanks,
Tim
Type: | Discussion |
---|---|
Status: | New |
Thanks, Jordi. It sounds like "option b" would be the best way for me to go.
Tim
Tim
I will often make a copy of /root/packages/THEME_NAME/themes/THEME_NAME folder and move that copy to /root/themes. I then make any changes i need there. Preserving the original code and saving me from the fear of accidental upgrades. Do note that there will still be some files in the original theme location that you may need to edit. I've not experimented with moving things like main.css.
I will often make a copy of /root/packages/THEME_NAME/themes/THEME_NAME folder and move that copy to /root/themes. I then make any changes i need there. Preserving the original code and saving me from the fear of accidental upgrades. Do note that there will still be some files in the original theme location that you may need to edit. I've not experimented with moving things like main.css.
I will often make a copy of /root/packages/THEME_NAME/themes/THEME_NAME folder and move that copy to /root/themes. I then make any changes i need there. Preserving the original code and saving me from the fear of accidental upgrades. Do note that there will still be some files in the original theme location that you may need to edit. I've not experimented with moving things like main.css.
if it's a small CSS customization, I recommend goingo to Dashboard -> Themes -> Long Story Short Parallax -> Customize -> Add your CSS. This way, your changes are not lost when you upgrade.
If you need to make more complex changes, I guess you have two options:
a) Changing the package files: you need to be extra cautious, because if you or a client accidentally update the theme, all your changes will be lost. So if you decide to change the package files, you should backup any custom files. Then, when you decide to upgrade, you should manually change those files again.
b) Creating a new theme: if you really need heavy customization, probably the best idea is to clone it into another theme. This way you don't run the risk of losing your changes. If you ever need to upgrande, you can manually patch your version of the theme.
Here are a couple of links that might help
https://www.concrete5.org/community/forums/customizing_c5/overriding...
https://www.concrete5.org/documentation/how-tos/developers/change-th...
Regards,
Jordi