Introduction
Craft CMS channels, Dot All call for speakers, tips, plugins, and more.
Hello Craft friends. I hope this newsletter finds you doing well.
The Craft CMS community is a remote-working one already, so we're more likely to be prepared for the virus-lockdown than many people are. This is still difficult, and we're in this together.
Head over to the Craft Discord group is a great place to commiserate. Check out the #random channel, a place to simply check-in with other members of the Craft community, even if it's not Craft-related. Say hello. Ask advice. Offer an ear to someone. Funny GIFs are also welcome.
If you've got work-related topics, #shoptalk would be an excellent place to hang out. See how others are dealing with the "this-is-our-new-normal" working life.
In this issue, we've got another batch of great Craft, and web dev links lined up. I hope you find something here that offers a welcome distraction or inspiration for learning something new.
Thanks to Solspace for sponsoring this issue.
Freeform is the feature-filled form plugin for Craft CMS that includes ready-to-use templates to get you up and running quickly. Learn about the power of Freeform.
Let's hit the links.
-John Morton
Top Stories
State of Craft - Dot One Melbourne 2020
Dot One is a wrap. It looks like the Craft team picked a beautiful spot, the Treetops Room at Melbourne Museum. If you want to relive the conference via social media, check out the #dotone2020 hashtag on Twitter.
The link above is to Brandon's keynote on the State of Craft. The announcement that seemed to generate the most enthusiasm was Nitro, a project that promises to make local development of your Craft sites a breeze. Nitro is currently in development.
Dot All Conf | 2020 Call for Speakers
Do you have something to share about Craft CMS? The call for speakers to Dot All in Amsterdam this September is open for submissions.
News
Update on Craft Cloud
Brandon's posted an update on Craft Cloud, the upcoming one-stop-shop for managing all things Craft.
Vue Developer | Work With Craft
Do you love Vue and Craft CMS? The Craft team is looking for you. It looks like a great opportunity.
Updating Plugins for Craft 3.4
Do you have a plugin? Craft 3.4 brought an updated look and feel to the control panel along with some other changes. It's not a major change for your plugins but this post outlines the changes and how to deal with them.
Featured Sponsor

Effortlessly build beautiful forms in minutes with Freeform!
Freeform is the most reliable, intuitive and powerful form building plugin for Craft. Everything is at your fingertips in our elegant form builder. It gives you full control to create simple or complex multi-page forms, as well as connect your forms to many popular API integrations. Templating is easy and highly customizable. Our ready-to-go templates and features like built-in AJAX and Conditional Rules Logic will have you ready in minutes! No other form plugin even comes close to comparing! You can trust Freeform (and the team behind it) to deliver the quality and support you expect and deserve.
Tools, tips, and fundamentals
Assigning a function to postLogoutRedirect
You may know about the postLogoutRedirect
config option already. You can set this value in your configuration to a string to define the path users are directed to upon log out.
The value type accepted is mixed
though, not just a string. You can dynamically redirect users after they log out of a site by assigning a function to the postLogoutRedirect
config. Check out this Github issue, where Brandon shared a code example to demonstrate.
h/t Evan Warner
Responsive Image srcset Macro for Craft
Jeremy Frank shows how to streamline responsive-image code in templates with Twig macros.
Relative image transforms for PPI based responsive images coming to Craft 3.5
Craft's withTransforms
asset query param is getting an improved syntax in Craft 3.5. It will get "srcset
-style sizes".
For example, in earlier versions of Craft, you would do this:
{% set assets = entry.myAssetsField
.withTransforms([
{width: 300, height: 300},
{width: 450, height: 450},
{width: 600, height: 600},
{width: 900, height: 900},
])
.all() %}
When Craft 3.5 is released, this transformation can be more streamlined like this:
{% set assets = entry.myAssetsField
.withTransforms([{width: 300, height: 300}, '1.5x', '2x', '3x'])
.all() %}
Solving Problems with Modern Tooling
Andrew Welch spoke at Dot One 2020 about how modern tooling can make the sites we build better for our clients. He shared his speaker deck at the link above. It shows how he took an old Cake PHP site and rebuilt it with a modern stack including Craft CMS.
Placeholder image macro for Craft CMS
Piotr Pogorzelski shows how to use a simple Twig macro to generate a placeholder image with specific dimensions.
More aliases than you can shake a stick at
In this tip on Twitter, Andrew showed the many aliases available in Craft beyond the familiar ones,@web
and @webroot
.
devMode.fm // Sizzy the browser for developers & designers
Lea Alcantara joins the devMode regulars to talk with Kitze about Sizzy, his web browser for developers & designers.
Perfecting your technique
Craft, PostgreSQl and Heroku.
Mark Lowe shared slides on working with Craft on Heroku with integration with Salesforce.
Working with Gatsby and Craft CMS | Dimitri's tutorials
Dimitri Mestdagh demonstrated how to use the GraphQL schema from Craft CMS as a source for a Gatsby project.
Example for NextJs + Craft (GraphQL) Integration
Drew Hutton posted this example to Github recently. There is not much documentation, but it will be helpful if you're trying to set up something like this yourself.
Remove specific kinds of products from the cart in Commerce
Josh Angell shared this tip for managing items in a cart using Craft Commerce.
Content Marketing (Servd, February 2020)
Matt Gray discusses building a B2B SaaS and how he's approaching it with Servd.
How To Add Featured Search Results To Craft CMS
Mitchell Kimbrough from Solspace shows how to make featured items bubble to the top of search results.
Plugged In
Asset Lockdown
Extend Craft CMS permissions to allow locking down access to the Assets Page but still allow uploading.
Instagram Media
Craft 3 CMS Plugin to retrieve Instagram media (from an account you have access to) using Facebook’s “Instagram Basic API.”
Super PDF
Creating a PDF is fast and easy with Super PDF. Super PDF is backed with DomPDF library and gives you full power to covert your twig templates into PDF. You can pass external CSS and HTML 4.0 attributes working with it. All the functionality DomPDF provides can be accessed easily in Super PDF.
Teamleader
A connection between Craft Commerce and Teamleader to have an easy flow of invoicing. (Note: I'm unfamilar with Teamleader, but I think this is the API this plugin integrates with.)
Japanese Date
Converts a date string or date object to Japanese format, with the ability to calculate and display the Modern Japan Era name (Reiwa/令和, Heisei/平成, Showa/昭和, Taisho/大正, Meiji/明治).
The Craft Advantage
Yii, Twig, PHP & More
Looking At The PHP 8.0 Performance So Far In Early 2020 - Phoronix
So far PHP 8.0 is shaping up to offer modest performance work over PHP 7.4 but it will be more interesting to re-visit when PHP 8.0.0 is actually closer to being released.
It’s not Craft, but it’s interesting.
Like console.log but better
In the previous issue, there was a link understanding console
command. This is another great post on the topic.
Selectors Explained
This tool will translate your CSS selected into plain English. For example, the link describes what div.slides .slide:first-of-type
actually means.
How to Copy or Move Objects from one S3 bucket to another between AWS Accounts
This post comes in two parts. The link above is to Part 2 because it contains the solution. If you want to read both in order, here are both links:
devMode.fm // Exiting the Tech Business
On this episode, we talk to Matt Barron, who as of today, left his job as a senior designer at Thinkmill… and exited the tech business entirely.
Maildev: SMTP Server + Web Interface for viewing and testing emails during development.
MailDev is a simple way to test your project's generated emails during development with an easy to use web interface built on top of Node.js that runs on your machine.
How To Run Your Life Inside of Notion - Superorganizers
Marie Poulin gives a tour through the most impressive Notion setup. Also, if you're into this post check out her YouTube channel.
How to use CSS variables like a pro
In this tutorial, we’ll provide a soft introduction to this concept by first demystifying CSS variables and then building two simple projects that utilize it.