{# ------------------------------------------------------- #} {# ONE OFF VIEW <%- typeName %> #} {# This page can use any data from http:localhost:2000/cms/#/form/<%- typeName %>/ #} {# Webhook uses the SWIG.js (like Djagno/Twig) templating system. Their documentation is here: #} {# http://paularmstrong.github.io/swig/docs/tags/ #} {# Learn about calling data into Webhook pages here: #} {# http://www.webhook.com/docs/template-rules-and-filters/ #} {# ------------------------------------------------------- #} {# Confused what extends and blocks do? Watch a primer: #} {# http://www.webhook.com/docs/template-inheritance-blocks/ #} {% extends "templates/partials/base.html" %} {# This sets our page . It will append this <%- typeName %>'s name to the site title defined in base.html #} {% block title %}{% parent %} - {{ cms.<%- typeName %>.name }}{% endblock %} {% block content %} <h1>{{ cms.<%- typeName %>.name }}</h1> <ul> <% _.forEach(typeInfo.controls || [], function(fieldInfo) { %> <% if(fieldInfo.controlType !== 'layout') { %> <li> <strong><%- fieldInfo.label %>: </strong> <% if(widgetFiles[fieldInfo.controlType]) { %> <% print(renderWidget(fieldInfo.controlType, fieldInfo.name, controls[fieldInfo.name], 'cms.' + typeName + '.' )) %> <% } else { %> {{ cms.<%- typeName %>.<%- fieldInfo.name %> }} <% } %> </li> <% } %> <% }); %> </ul> {% endblock %}