Introduction
Craft tips, plugins, stars and Berlin.
We're still a couple months away from the official Craft 3 release date, but the Github Craft repo is already over 1000 stars. Plus we've got a bit of news regarding the next Dot All, coming in September.
The tide seems to be turning here in link-land to favor Craft 3 content as well. Most of the news, tips and plugins have a Craft 3 focus to them. There are still Craft 2 goodies in here, but, thankfully, there is no mention of Craft 4. (Just keep swimming, my friend, we'll get there.)
Thanks to fortrabbit for sponsoring this issue!
Let's hit the links.
-John Morton
Top Stories
Dot All – The Craft Developers Conference 2018 in Berlin
Sprechen Sie Craft? Sign up and keep in the loop about the upcoming Craft conference in Berlin.
News
Craft CMS 2.6.3006
Also check the change notes from the previous update, v 3005, as well. Users’ field layouts can now have multiple tabs.
Top Shelf Craft acquires SquareBit's plugins: Charge, SearchPlus, Shortlist, and Maps
Fans of the Craft plugin Charge, SearchPlus, and Shortlist there is good news for you. Top Shelf Craft has got you covered for Craft 2 support and Craft 3 versions. Congrats, TSC!
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
Craft Docs: About "aliases" in Craft 3 ⭐️
In addition to the Craft doc above, you may also want to check out the Yii docs on aliases as well:
“Aliases are used to represent file paths or URLs so that you don't have to hard-code absolute paths or URLs in your project.”
Docker Dev Stack
Bert Oost shared his Docker Dev Stack last week. It supports local development of Craft CMS projects via Docker images (with NginX, PHP7.1, MySQL etc.) using Traefik to register your project-domain. You have to do the DNS yourself.
About “Happy Paths” and Craft
In general the execution of a method should only make it all the way to the end if everything went as expected. That's a "happy path" and is part of the Craft CMS coding guideline. Check the link for some examples.
Module support added to pluginfactory.io ⭐️
pluginfactory.io now allows you to create Modules for Craft CMS 3 as well as plugins.
How can I set dynamic Base URL in sites setting in Craft 3?
Another option mentioned in Slack directly was:
// Set the environmental variables
'custom' => array(
'basePath' => getenv('CRAFTENV_BASE_PATH'),
'baseUrl' => getenv('CRAFTENV_BASE_URL'),
'rootUrl' => getenv('CRAFTENV_SITE_URL'),
),
Soon after this issue went out, Andrew told me he's actually updated how he does this using an alias now that Craft 3 RC7 supports them. Check out this link of Github with the full details:
When Twig expects a string but you have a variable.
Imagine you are trying to merge a bunch of items into an array and tomorrowDate
is a variable, not text. The following Twig would fail.
{% set groupedEventItems = groupedEventItems|merge({ tomorrowDate: eventItem }) %}
How do you get tomorrowDate
to be read as a variable and not just text? Use parentheses to make Twig recognize tomorrowDate
as a variable, like this:
{% set groupedEventItems = groupedEventItems|merge({ (tomorrowDate): eventItem }) %}
And Jake Dohm also mentioned this "works in other contexts, not just merge, where Twig expects a string and you have a variable."
Perfecting your technique
Structuring a React App for a CMS
Unlike a framework such as Angular, React does not impose any architectural constraints on you. I like the flexibility this allows. However, when building a large scale, app if there isn’t any form to the application it becomes even more difficult to modify the app. These ideas aren't just for React. They can be adapted for use with any frontend library or framework.
Sponsor

Pic Puller: The Instagram plugin for Craft CMS 2 & 3
Pic Puller brings your Instagram media into Craft CMS with one-click authorization. Full documentation and code samples get you up and running quickly. Learn more at picpuller.com or find it in the plugin store in your Craft 3 control panel.
Plugged In
Architect for Craft 3 (beta 1)
The architect can import and export just about anything in craft that needs to be configured by importing and exporting content models from Craft CMS using JSON. This the new version for Craft 3; it's still pretty fresh.
Craft 3 GTmetrix
GTmetrix gives you insight on how well your entries load and provides actionable recommendations on how to optimise them.
Craft 3 plugin backwards compatibility and maintenance for 2.x
There's an interesting question in Stack Exchange about how "developers maintain two plugins where the core functionality is essentially the same code." If this applies to you, check out this SE discussion.
Craft Campaign
Craft Campaign is a plugin for Craft 3 that allows you to create, send, manage and monitor email campaigns, right within the control panel.
Craft3 Fallback Site
This plugin allows each site to fall back to another site when a requested element cannot be found. This allows multi-site installations (typically for multiple languages) to gracefully fall back to existing content if available.
There is also a version available for Craft 2.
Similar
Similar for Craft lets you find elements, Entries, Categories, Commerce Products, etc, that are similar, based on... other related elements.
Craft Notifications
Send notifications across a variety of delivery channels, including mail and Slack. Notifications may also be stored in a database so they may be displayed in your web interface.
Width Fieldtype
This plugin allows users to choose from predefined widths to give clients flexibility, but not too much.
The Craft Advantage
It's not you, it (was) me.
In a discussion of CMSs in general, James Greig shared a link to his personal newsletter where he discusses "Exploring modern CMS options".
Wordpress is like stuffing all of your clothes into shoeboxes, and then stacking them up against the wall. It's a free solution, but you end up stuffing your clothes into spaces they don't belong.
Yii, Twig, PHP & More
Overheard
It’s not Craft, but it’s interesting.
devMode.fm // The Web of Future Past with John Allsopp ⭐️
The devMode podcast talks with web veteran & founder of the Web Directions conference, John Allsopp.
GDPR-ePR-Guide
Andrew Fairlie “started an open source guide about GDPR and ePrivacy Legislation coming in May. It affects everyone who stores data on European citizens, and is a bit of a minefield.”
A GraphQL Primer: Why We Need A New Kind Of API (Part 1) ⭐️
Part 1 doesn’t actually get to GraphQL but it does a good job of whetting your appetite for Part 2.
CSS Gridish by IBM
Automatically build your grid design’s CSS Grid code, CSS Flexbox fallback code, Sketch artboards, and Chrome extension.
The best standing desks for your home or office
This Business Insider post linked above was mentioned on Slack when the topic of standing desks came up a couple weeks ago. Several specific desks your fellow-Crafter-users were also mentioned:
Browserslist
Share target browsers between different front-end tools, like Autoprefixer, Stylelint and babel-preset-env.
Umar Hansa: “A Modern Front-end Workflow” at Fronteers Conference 2017 ⭐️
Umar Hansa is a master. Highly recommended.
Awesome Scalability
A curated list of selected readings to illustrate Scalability, Availability, and Stability Design Patterns in Back-end Development.