Powerful Templates

By Mike Neumegen · 21 Aug 2013
· Features
Powerful Templates

You guys asked for it, and here it is. We're so excited to announce the brand new templating feature in CloudCannon.

Making changes to the structure of your website can involve editing every single HTML page. Now you can include a file into your HTML pages making updating a breeze

We've made the syntax as simple as possible. Simply adding <!-- include header.html --> to an HTML page is all you need to save yourself some serious time. See our docs for a more detailed explanation.

We've also launched a few smaller features to make your life easier. Adding an underscore to the beginning of a file name (e.g. _header.html) makes the file inaccessible to visitors and hides it from your clients in the client editor. This is great if you have templating files lying around you don't want anyone to see.

Highlighting the current page is much more straightforward. CloudCannon automatically adds a class of cc-active to any <a> tags which point to the current page. Using some CSS and the cc-active class you can highlight the active page (Especially useful when you're using includes).

Launch your website today

Give your content team full autonomy on your developer-approved tech stack with CloudCannon.

Get started free!

You might also like:

A new way to configure your CloudCannon sites

A new way to configure your CloudCannon sites

David Large · 8 Aug 2023

DAM Support for Cloudflare R2 and DigitalOcean Spaces

DAM Support for Cloudflare R2 and DigitalOcean Spaces

David Large · 15 Jun 2023

How to customize CloudCannon’s Client Sharing interface

How to customize CloudCannon’s Client Sharing interface

David Large · 5 May 2023