Powerful Templates

|
headshot of Mike smiling
Mike Neumegen
21 August 2013

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).

You might also be interested in

Illustration showing CloudCannon's Editor Panels

Component editing with Editor Panels

Dave Strydom

14 December 2021

Read more
Graphical representation of an _inputs key

Updated input configuration for your workflows

CloudCannon

26 November 2021

Read more
Blog image for our new UI improvements

Sparking joy: CloudCannon UI improvements

Dave Strydom

12 November 2021

Read more
Don’t miss the latest
A monthly newsletter to keep you up-to-date with the latest CloudCannon news
Illustration of woman holding an envilope