zaengle/statamic-templateconventions

There is no license information available for the latest version (dev-master) of this package.

dev-master 2021-07-22 17:40 UTC

This package is auto-updated.

Last update: 2024-06-23 00:00:23 UTC


README

Statamic Template Conventions

This package provides templating conventions for differentiating between partials, components, and fields.

Requirements

  • PHP 7.3+
  • Statamic v3

Installation

You can install this package via composer using:

composer require zaengle/statamic-templateconventions

The package will automatically register itself.

Usage

Our tags pair nicely with Statamic's {{ partial:{path/to/partial} }} tag. They allow for more semantic, explicit inclusion of templates.

Each tag accepts a wildcard path to the given template. Any number of params may be passed as part of the tag.

// Component Tag will look in views/components/...
{{ component:{path/to/component} }}

// Field Tag will look in views/fields/...
{{ field:{path/to/field} }}