Editing a Template for V7

Note: If you’re using version 8 of the Editor please see the V8 documentation: Editing a Template for V8.

After you have set up the Template Development Kit in your local development environment you’ll want to start editing a template, be that one you downloaded or one you made yourself.

Your code editor

In order to start developing a template, you’ll need to download a code editor of your choice. We recommend using:

In our example below we are using Sublime Text editor:

Sublime Text

You’ll notice as well that we’re using the template June, you can check out the code for this template on GitHub. The template has a specific folder structure, using .twig files to set out page layouts and partials. As well as .less files for styling the template. To find out more template development check out Using LESS, using Twig along with other sections within Templating.

Viewing your changes

Once you have made your code changes you might want to ‘update’ with the Template Viewer to view those changes and make sure everything works. You can do this as you go along if preferred. You can do this by clicking the update button at the top right hand corner of the Template Viewer. This will then pull your masterpiece of code from your chosen code editor into the Template Viewer.

TDK buttons

If you are happy with your changes you can then save the file, convert the template into a zip file, and upload it back to the Editor. Zip the file back up with your changes click on the ‘Save as Zip’ button. You will then need to find your zip file on your computer - This would normally be where your downloaded items end up.

What’s next?

Check out the documentation on uploading a template.