Introduction
Who is Craft CMS for? Plus news, plugins and more.
Once again there's another selection of tips and plugins from the Craft community. Two pieces stand out though. Craft CMS 3 Orientation Guide and Who is Craft for? are worth bookmarking and sharing. Give them a read. The extremely specific PHPStorm tip about language injection was interesting too.
If you've got something to share, check out the submit a link page or find me on Slack.
Thanks to fortrabbit for sponsoring this issue. If you're going to host a Craft site, and I know you probably are, be sure to check them out.
Let's hit the links.
-John Morton
Top Stories
Craft CMS 3 Orientation Guide - Welcome! ⭐️
Andrew Welch is well-known to most readers of this newsletter for all the knowledge he shares with us. This post is for the newer members of the Craft community but even if you're an old hand at Craft it gives you some framing language to tell your fellow developers and clients about Craft.
News
Craft 3.0.20 released
Craft 3.0.20 was fairly small and tidy, but did you see the new in 3.0.19?
- Added the craft.query() template function, for creating new database queries.
Basically, you can build your own SQL queries. There was some concern in Slack that this provides a little too much power, letting you potentially make overly complex queries to your database. But that's what you get with power tools. Power.
Featured Sponsor

Craft CMS Hosting Partner
fortrabbit is affordable, easy-to-use, scalable, and super developer-friendly. Regardless of the size of your project, fortrabbit takes care of the AWS heavy lifting allowing you to focus on development.
Tools, tips, and fundamentals
PHPStorm Pro tip for Twig templates
In Slack there was a discussion about getting code fragments formatted in Twig templates in PHPStorm. Specifically, to correctly format JavaScript code inside {% includejs %}<!-- your JS here-->{% endincludejs %}
code blocks use language injections.
When your cursor is inside the code block, on Windows use: Alt + Enter
or on a Mac use: Opt + Return
Then select "Javascript" from the language injection menu.
Reformat the Twig file and it will treat the block as JavaScript, with the proper formatting and code syntax highlighting. Go even further and save this as a custom language injection. See Jalen Davenport's Tweet on this topic here.
Further on this topic:
Handy Craft Tips & Tricks
I thought this presentation from DotAll 2017 had been in the newsletter previously, but just in case, these are some pro tips worth reviewing.
Perfecting your technique
Is it possible to limit the title field in an entry?
It's not built into the out-of-the-box Craft install, but the EVENT_BEFORE_SAVE
event and a small custom plugin would get you there.
Standard Agreements for Digital Services with Gabe Levine & Josh Barrett
In this episode of CTRL+CLICK CAST:
The service agreements you sign with your clients are more than just legal contracts. They are core to your business operations and client relationships.
Plugged In
Eager Beaver for Craft 3
Allows you to eager load elements from auto-injected Entry elements on demand from your templates.
Craft Cheat Sheet plugin for Craft 3
A fast and customized set of instantly usable Field code samples.
Connect plugin for Craft CMS 3.x
Allows you to connect to external databases and perform db queries.
Craft Vue now uses Vue CLI 3
All the power of a Vue CLI's scaffolding, dev tools, and single file components tailored for a Craft CMS project. Updated Craft-Vue to use the new Vue CLI 3.
(See also "Vue CLI 3.0 is here!" later in this newsletter.)
The Craft Advantage
Who is Craft for? ⭐️
In Slack recently a user asked "what makes the craft technology stack so good compared to other CMS's?" Leslie Camacho, Customer Officer at Pixel & Tonic, shared the following:
For biz people... Craft sits between WordPress and “Enterprise” which is where the majority of agency work comes from. In terms of budgets, Craft is very successful in budgets of $25k - $300k (and there are certainly smaller and larger Craft projects budget wise too). This translates to great work for small to mid-size businesses. Those budgets are real, but not big enough to be interesting to Acquia (makers of Drupal) or Automattic. Neither company is interested in optimizing their CMS's for those budgets/clients. For internal projects this also holds true. Nobody at Automattic or Acquia is directly responsible to you for any bugs or security issues you may encounter. At Craft, we have direct responsibility since we sold you the software. To get the same response from the makers of Drupal or WP, you’re looking at a min $15k/yr spend, more likely around $75k.
This is another way of saying that Craft is made for devs, authors, and designers and not enterprise IT managers or stakeholders that will never touch the CMS. So even though you have similar tech stacks, the use case is different, so the experience using the two is pretty different as well. Craft is always optimized for the people who interact with it on a daily bases.
Yii, Twig, PHP & More
It’s not Craft, but it’s interesting.
Apex Charts
A modern JavaScript charting library to build interactive charts and visualizations with simple API. Also, here's why the author created yet another charting library.
Alfred Tailwind CSS Docs
An ultra-fast TailwindCSS docs search workflow for Alfred 3. (Note: Alfred is a Mac only thing. Sorry Windows users.)