Pass terms variable to template.

Change-Id: Ida8c00342acf5c588301698e63e9bae9428ed928