0

I recently made changes to template and node.tpl files for my theme. Is there a recommended way of implementing preprocess changes as to not hard code them into these files (in case of theme updates) or am I going to have to re-code them after theme udpates?

4

In an ideal world, you would create a sub-theme off of your master theme. For example, most people don't use the Omega or Zen themes directly; rather they use the starter kit which is included as the basis for the sub-theme.

The sub-theme will inherit features from the base theme, but allow you to customize as needed. When the base theme gets updated, the sub-theme doesn't get touched.

Whether you can retrofit your theme to actually be a sub-theme depends on your situation, but I suspect it is possible.

| improve this answer | |
  • I use adaptivetheme... which is the core for pixture_reloaded theme... so I would only make changes to the pixture_reloaded theme in my case? EDIT: Just found a possible issue, I have to edit the node.tpl file... and the sub-theme doesn't have one. – Mechaflash Jan 13 '12 at 22:04
  • When a sub-theme doesn't have a file, it uses the one from the bases theme. You can copy that one into your sub-theme, and then edit it. – mpdonadio Jan 13 '12 at 22:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.