Avoid using the page-level template editor

If you’ve been working with NationBuilder long enough, you’ve probably modified a page’s template. You’ve done it, right? Of course you have. More than likely, it was for something small: a tweak to the submit button, or maybe to add a custom field. It was quick, pretty easy, and got the job done.

Still, I want you to stop doing that. It’s bad for you, like pulling an all nighter to prep for a big exam. It may have worked that one time, but it’s not sustainable and — in the long term — it’ll do more harm than good.

A little context: what is page-level editing?

Just to make sure we’re all on the same page, I’m talking about editing a page’s template using the “Template tab” in the NationBuilder Control Panel.

Screenshot: The template editor

Using this editor, you can modify the template code that renders that individual page. It’s a great — and largely safe — way to modify a single page, because at any time you can restore the default template and wipe away any changes (or mistakes) you’ve made. Quick; easy; and safe.

So why should I avoid it?

Every time you make a page-level change, you permanently separate that page from your theme. The page’s template becomes a sort of island apart from the rest of the theme: any future updates to the theme won’t affect it, and indeed if you change themes that page won’t receive the new theme’s layout, either.

For example, imagine that you have created a set of ten donation pages to facilitate the purchasing of paid memberships at various price levels. By default, the submit button on donation page forms is labeled “Process donation” — but these aren’t donations, they’re memberships. So, naturally, your intern went through and industriously edited each page’s template to make the buttons say “Purchase membership.” You were thrilled! That is, of course, until you noticed the typo on one of the form field labels.

So you called your NationBuilder Architect and asked him if he could correct the typo, which he swiftly does, but nothing changes on the site. Turns out that because your intern modified each page’s template, those changes your Architect deployed aren’t having any effect. You’ll need to go through each individual page and update them individually — but be careful copying & pasting, because you don’t want to accidentally overwrite your earlier customizations!

This is the core problem with page-level edits: the more page-level edits you make, the harder your site becomes to maintain in the long term.

What do I do, then?

Taken one at a time, these changes are all rational and seem like the best, quickest decision — not unlike pulling an all-nighter when you have a hard deadline coming up. But like all nighters, page-level edited just aren’t sustainable in the long term.

So how do you avoid this problem? By working with a certified Architect to edit at the theme level whenever possible. My guiding rule is that if the same edit or change needs to be applied to two or more pages on your site, it ought to be done at the theme level so that — in the future — it can be updated in a single place.

It’s perfectly valid to edit at the page-level if you really are making changes just to a single page, but when you move beyond that the costs really do outweigh the benefits.

Share this post