As good as NationBuilder is for the client the theme development workflow is not particularly sophisticated. For me it consists of connecting dropbox, developing a new theme within my own Nation, pushing it to the clients Nation when it’s time to go live.
I used to use a base theme as a starting point which contains a lot of default styling and functionality. Client specific theming was then done on top of that. Inevitably, when I work on a new theme I find myself solving problems and refining functionality that makes the base theme better. This then means for my next project I’m going to need to remember to copy all of those improvements back into my base theme before starting the process again. This is really time consuming and slows down your flow on any new build.
I now have a new technique for keeping a starting point theme that continues to evolve over time. Instead of using the same base theme for my next project I will use my previously developed client theme but strip out anything specific to that client. With this method the challenge then becomes how to know what stuff I can strip out, i.e. client specific, and what stuff is core.
Adding a signifier to client specific styles
My method is to append a client signifier to any new additions to the theme that are specific to them. So, for instance, let’s say our client is called ‘The Space Room’ (inventive) and I want to add an underline to certain headers. I’ll add an intuitively named class to the headers (e.g. ‘underline’) but then append a consistent signifier to the end of it (e.g. ‘_the_space_room’). The class ‘underline_the_space_room’ can then be added to my sass file and styled as required.
This means when I move on to my next project I can copy the latest theme, find the words ‘_the_space_room’ in my sass files and know that any instance can be removed for the next build. The signifier gives us a good way of identifying styling that can safely be removed at a glance.
Adding a signifier to client specific files
This method works the same way if you’re creating new files to sit within your theme. Maybe you need to create a sub template to add some new functionality that’s client specific. Give the file a name like ‘_new_functionality_the_space_room.html’. Need to add an image to the theme? Give it a name like ‘image_the_space_room.jpg’. You can then remove those files and any reference to them for any new theme safe in the knowledge that you’re not breaking your core functionality.
Leave a Reply