Skip to content

Partials

CEO provides a number of partial templates that help generate content or other functionality.

helpers/policies/cookies

Generate the necessary HTML to present a default cookie policy

{% include 'helpers/policies/cookie.twig' with {
    siteName: 'The State News',
    siteUrl: 'https://statenews.com',
    siteState: 'Michigan'
} %}

Options:

  • siteName: override site name (config site name)
  • siteUrl: override site url (config site url)
  • siteState: override site state (Michigan, main SNworks datacenter)

helpers/policies/privacy

Generate the necessary HTML to present a default privacy policy

{% include 'helpers/policies/privacy.twig' with {
    companyName: 'SN Media Group',
    siteName: 'The State News',
    siteUrl: 'https://statenews.com',
    siteState: 'Michigan'
} %}

Options:

  • companyName: override company name (config site name)
  • siteName: override site name (config site name)
  • siteUrl: override site url (config site url)
  • siteState: override site state (Michigan, main SNworks datacenter)

helpers/policies/terms

Generate the necessary HTML to present a default T&C policy

{% include 'helpers/policies/terms.twig' with {
    companyName: 'SN Media Group',
    siteName: 'The State News',
    siteUrl: 'https://statenews.com',
    siteState: 'Michigan'
} %}

Options:

  • companyName: override company name (config site name)
  • siteName: override site name (config site name)
  • siteUrl: override site url (config site url)
  • siteState: override site state (Michigan, main SNworks datacenter)

helpers/galleria

Generate the necessary HTML and JS to build and render a Galleria instance.

{% include 'helpers/galleria' with {gallery: myMedia} %}

Required:

  • gallery: media instance

Options:

  • version: galleria version (1.5.7)
  • className: class for the gallery instance (media-uuid)
  • height: stage height (500)

helpers/gdpr

Generate the necessary HTML and JS to present a GDPR cookie notification.

{% include 'helpers/gdpr' with {url: 'page/cookies'} %}

Options:

  • url: path to privacy policy or cookies policy page ('page/cookies')
  • warningText: override text content of the warning
  • parentId: override the master class (gdpr-container)
  • timeout: override default timeout in days, set to 99999 to hide forever (365)

Layout:

_____________________
| #gdpr-container   |
| ________________  |
| | #gdpr-close  |  |
| ----------------  |
| _________________ |
| | #gdpr-content | |
| ----------------- |
---------------------

helpers/meta

Generates standard meta based on route and output template. Include in base template.

Will generate the necessary meta and structured data for pages, sections and articles. Allows for the use of SEO overrides, url filtering and noindex/nofollow overrides.

{% include 'helpers/meta' %}

payments/payment-form

Generate the necessary HTML and Javascript to build a standard payment form

    {% set formData %}
        <label>Classified Text</label>
        <textarea name="order[classified]"></textarea>

        <hr />

        <label>Bold
            <input type="checkbox" name="order[bold]" value="1" />
        </label>

        <hr />
    {% endset %}
    {% include 'payments/payment-form.twig' with {
        'processor': 'classad',
        'next': 'page/class-capture',
        'final': 'page/class-complete',
        'formData': formData
    } %}

Required:

  • processor: Processor name, generally defined in the client's config
  • next: Route to capture form
  • final: Route to completed page
  • formData: Extra form data

Options:

  • none

payments/stripe-form

Generate the necessary HTML and Javascript to build a Stripe payment form

{% include 'payments/stripe-form' with {order: myOrder} %}

Required:

  • order: Payments\Models\Order instance

Options:

  • none