<<< Back to the blog

Statamic 2.8 has arrived!

Statamic 2.8 introduces Bard, a new fieldtype to rival Medium.com and Wordpress Gutenberg, as well as 41 other great enhancements.
Jack McDade
Jack McDade January 10th, 2018

We had an ambitious goal for 2.8. We believed we could do it, and gosh darn it if we didn’t just succeed.

The secret to doing anything is believing that you can do it. Anything that you believe you can do strong enough, you can do. Anything. As long as you believe.

Bob Ross

Statamic 2.8 has one crowning feature — a giant, ambitious, delightful master piece — and lots of small enhancements that snuggle up to it for a contact high. I dislike long rambling intros so let’s get right into it. Here are 2.8’s top 5 new features.

1. The Bard Fieldtype 👑

We’ve thought long and hard about what Statamic users do most. About what content authors do most, for that matter. We’ve looked at the landscape of the competition and other publishing tools, what interfaces people gravitate towards, and think the answer is painfully simple.

People just want to write.

The thing is, writing has evolved. Sites grow, layouts change, and writing tools grow stale. WYSIWYG fields are often regarded as the devil (a sentiment we share). Markdown is great a lot of the time, but it has limitations when dealing with rich content. Wouldn’t it be great if it was easy, seamless even, to create highly structured content so your site can evolve with the times?

If WordPress’s Gutenberg (or Medium.com) got married to our Replicator and had a grownup baby all Benjamin Button style, it would be Bard.

We’ve spent a few months working on Bard. It’s a text field. It has rich formatting controls but it’s not a WYSIWYG. It shares many features with Replicator, enabling you to create and rearrange sets of fields and insert them anywhere in your text content. It stores structured content like Replicator, allowing your markup to evolve over time without having to rework your content.

I could talk about it all day, but how about just watching it in action?

With Bard, just like with Replicator, you can figure an unlimited number of sets of fields that can be inserted into your main content flow. You could build almost anything with it. We can’t wait to see what you do with it.

If you want to see how to template it out, check out the What I Did Last Summer sample post and long_form fieldset in a fresh Statamic download package.

2. The Video Fieldtype 🍿

Embedding YouTube and Vimeo videos is a pretty common action, yet extracting the ID and using the correct embed code is pretty painful if you want to support multiple services.

So we made it easy for you. Paste a URL or embed code into the the Video fieldtype and it will extract the correct URL and show you a preview to make sure it’s the right one. Pair it with two new modifiers and you’ll be embedding videos faster than ever.

Preview

Video Fieldtype

Use embed_url to convert the URL of a YouTube or Vimeo to the proper embed format.

Use is_embeddable to check whether a given string (i.e. the URL) is actually embeddable as an iFrame. Put these together and you have a reusable code block that looks like this:

{{ if video | is_embeddable }}
    <!-- Youtube and Video -->
    <iframe src="{{ video | embed_url }}" ...></iframe>
{{ else }}
    <!-- Other HTML5 video types -->
    <video src="{{ video | embed_url }}" ...></video>
{{ /if }}

3. Users can now be stored in a database

This has been an often requested feature. Perhaps you want to have a single source for your user accounts across all of your websites. Or maybe you have thousands of users. Or maybe you want to tie into an existing database. No matter your reason, it’s now supported. Here’s how to do it.

The most common follow up question we’ve had on to feature is “can this work for entries too?” Alas, no. That’s a completely different challenge we won’t be tackling in v2.

4. Routes can now automatically load data from other content

Ever create a one-off page as a route and wish you could just load content from another page or entry automatically and cut out the get_content tag? Well, now you can. Pass a URL or ID into the load var and you’re done.

routes:
  super-special-event:
    template: landing-page
    load: /faqs

5. Read-Only Permissions

Another often requested feature makes its debut in 2.8. Read-Only permissions can be set, like all other permissions, on a per-collection/taxonomy/asset container basis.

Read Only Mode

Wrapup

So go visit the changelog and checkout the 42 new things 2.8 has to offer. We worked hard on it and hope it makes your day. We’ll be back soon with a new post on where we’re headed with Statamic v3. Until then…

We ❤️ ya’ll!

A new feed approaches!