Statamic Custom Template Development (Antlers/Blade)

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.
Development and maintenance of all types of websites:
Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Showing 1 of 1 servicesAll 2065 services
Statamic Custom Template Development (Antlers/Blade)
Medium
~5 business days
FAQ
Our competencies:
Development stages
Latest works
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1161
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1041
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    822
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    847
  • image_website-sbh_0.png
    Website development for SBH Partners
    999
  • image_website-_0.png
    Website development for Red Pear
    451

Statamic Custom Template Development (Antlers/Blade)

Statamic supports both template engines: Antlers (proprietary, recommended) and Blade (Laravel standard). The choice depends on your team: Antlers is simpler for content-oriented templates, Blade is familiar to Laravel developers and supports components.

Antlers vs Blade

Antlers Blade
Syntax {{ collection:blog }} @foreach($blog as $item)
Variables {{ title }} {{ $title }}
Statamic Tags Native Via facades
Components Partials Blade Components
Performance Similar Similar

Antlers: template structure

{{# resources/views/layouts/app.antlers.html #}}
<!DOCTYPE html>
<html lang="{{ locale:language }}">
<head>
    <meta charset="utf-8">
    <title>
        {{ if meta_title }}{{ meta_title }} | {{ /if }}{{ site:name }}
    </title>
    <meta name="description" content="{{ meta_description ?? excerpt ?? '' | truncate:160 }}">
    {{ vite src="resources/js/app.js|resources/css/app.css" }}
</head>
<body>
    {{ partial:navigation :items="navigation:main" }}
    <main>{{ template_content }}</main>
    {{ partial:footer }}
</body>
</html>

Antlers: working with data

{{# Conditions #}}
{{ if is_premium and (user:is_logged_in or not config:require_login) }}
    {{ content }}
{{ elseif user:is_logged_in }}
    <p>Upgrade to Premium</p>
{{ else }}
    <p>Please log in</p>
{{ /if }}

{{# Loop with nested data #}}
{{ collection:blog sort="date:desc" limit="6" }}
    {{ results }}
        <article>
            <h2>{{ title }}</h2>
            {{ categories }}
                <a href="{{ url }}">{{ title }}</a>{{ unless last }}, {{ /unless }}
            {{ /categories }}
            {{ date format="d.m.Y" }}
        </article>
    {{ /results }}
{{ /collection:blog }}

{{# Scope — data isolation #}}
{{ scope:post }}
    {{ collection:blog limit="1" }}
        {{ results }}
            {{ scope:category }}
                {{ categories }}
                    {{ title }}: {{ post:title }}
                {{ /categories }}
            {{ /scope:category }}
        {{ /results }}
    {{ /collection:blog }}
{{ /scope:post }}

Blade: Statamic templates

{{-- resources/views/layouts/app.blade.php --}}
<!DOCTYPE html>
<html lang="{{ Statamic::tag('locale:language') }}">
<head>
    <title>{{ $page->get('meta_title') ?? $page->get('title') }} | {{ config('app.name') }}</title>
    @vite(['resources/css/app.css', 'resources/js/app.ts'])
</head>
<body>
    @include('partials.navigation')
    <main>@yield('content')</main>
    @include('partials.footer')
</body>
</html>
{{-- resources/views/blog/index.blade.php --}}
@extends('layouts.app')

@section('content')
<div class="blog-grid">
    @foreach($entries as $post)
        <x-post-card :post="$post" />
    @endforeach
</div>

{{ $paginator->links() }}
@endsection

Blade component for post:

{{-- resources/views/components/post-card.blade.php --}}
@props(['post'])
<article>
    @if($post->get('featured_image'))
        <img src="{{ Statamic::tag('glide')->src($post->get('featured_image'))->width(800)->height(400)->fit('crop')->fetch() }}"
             alt="{{ $post->get('title') }}">
    @endif
    <h2><a href="{{ $post->url() }}">{{ $post->get('title') }}</a></h2>
    <time>{{ $post->date()->format('d.m.Y') }}</time>
</article>

Partial with parameters

{{# Call partial #}}
{{ partial:card
   title="{ title }"
   url="{ url }"
   image="{ featured_image }"
   show_excerpt="true"
}}

{{# resources/views/partials/card.antlers.html #}}
<article class="card {{ if show_excerpt }}card--with-excerpt{{ /if }}">
    {{ if image }}
        <img src="{{ image | glide:width=600:height=400:fit=crop }}" alt="{{ title }}">
    {{ /if }}
    <h3><a href="{{ url }}">{{ title }}</a></h3>
    {{ if show_excerpt && excerpt }}
        <p>{{ excerpt | truncate:120 }}</p>
    {{ /if }}
</article>

Navigation with tree

{{ nav:main }}
    <ul>
    {{ tree }}
        <li class="{{ if page:is_current || page:is_parent }}active{{ /if }}">
            <a href="{{ url }}">{{ title }}</a>
            {{ if children }}
                <ul>
                {{ children }}
                    <li><a href="{{ url }}">{{ title }}</a></li>
                {{ /children }}
                </ul>
            {{ /if }}
        </li>
    {{ /tree }}
    </ul>
{{ /nav:main }}

Template development (layout, nav, footer, list, detail, static pages) — 4–8 days.