12 people look out at the sea under a clear sky

Five years ago we attended the Craft CMS conference in Berlin. We learned a ton about the best content management system there is, and had a blast at the same time. So when Pixel & Tonic announced that Dot All 2023 would be in Barcelona, we thought — let’s do it!

Our commitments to professional development and company culture sealed the deal, so we booked our conference tickets, flights and an awesome hotel in El Poblenou, and told everyone to pack their sunglasses.

Laura reflecting on Gregor Terrill’s talk: Enhancing Your Site’s Search Experience With Craft

I found Gregor Terrill’s talk on Craft CMS’s built-in search functionality very interesting from several takes.

The first was simply getting a better understanding of how site-search functionality in Craft CMS works, from how the search index is built, to how search queries are run, and how search scoring works. Search functionality is not something I had ever given much thought to, but once you understand how something works, you can start to think of instances when you might need it to work differently.

I enjoyed seeing working code examples. In my own role as a developer at Ten4 I’ve worked with a number of our own custom modules, so it was interesting to see some of the “nuts and bolts” of someone else’s code.

Gregor used the example of a board game café and bar to give working examples of how to manipulate Craft’s built in site search.

He showed how customising the search index code can change the way data is added to the database, in order to:

  • Prevent specific entries from being indexed by checking the value of a custom field, e.g. set a light switch field to true, to exclude those matches from the search index.
  • Return relevant results for nonspecific search terms. This is achieved by adding custom attributes to entries, registering a searchable attribute and defining the keywords. For example, adding the parent title to a entry so that the children appear in the search if the parent title is searched — so a search for “beer” would return results for “Hoppy IPA” and “Tasty Milk Stout”
  • Index different values than those entered in Craft’s entry fields by changing the value of a custom attribute before it is added to the search index. For example, entries could contain the term “hidden movement”, but by setting this value to an empty string, searching for “hidden movement” would return no results.
  • Automatically create “fallback” values by defining a custom attribute value if one hasn’t been set. This could be, for example, setting a game to “uncategorised” if no categories have been attributed to it in the Craft entry.

By changing how the search queries work, you can:

  • Restrict the results to specific entries by only querying entries from a list of IDs. For example, only returning results from a very limited number of entries, like a list of games that you know have dice as part of the play.
  • Use your own custom search scoring to bypass Craft’s built in scoring. For example, you could remove weighted search and set the search score by the number of times a term appears in the index instead. The result would mean that all appearances carry the same weight, rather than the title field carrying more weight than a rich text field.
  • Customise the results generated such as matching an entry to a term that doesn’t exist in the index. An example could be if a game has an older name no longer used, e.g. if someone searches for “diamant”, the game “Incan Gold” could be shown in the results.

Gregor also covered some third party search services, such as Algolia (which we have used in several Ten4 projects). These services offer more advanced features including synonyms, voice search, AI suggestions, typo tolerances, analytics, and much more.

While larger or more complex projects might call for the higher-level afforded by third-party search, my main take-away from Gregor’s talk is that—with a bit of know-how—Craft’s built-in search functionality can do a lot of heavy lifting on its own, creating rich, useful, customised search experiences for all.

———

Laura hails from Belfast and lives in Cumbria, where she enjoys all things outdoors.

Two men and a woman enjoying a cable car ride
A number of people sit on a wall above a beach
A man standing next to an enormous brass cat sculpture

Above

Taking the cable car to Montjuïc Castle; looking out over the Mediterranean; and a giant brass cat.

Mark reflecting on Prateek Rungta’s talk: Demystifying the Craft API for Twig Developers

For me, Prateek Rungta's talk highlighted the importance of periodically re-checking what you think you know about working with a platform like Craft.

Craft and its underlying template language, Twig, both receive regular updates to add new features. A task which required some complicated custom code in the past, might be much easier to achieve following a newly added function.

Prateek highlighted several specific instances of this (potential applications include assisting with collecting and filtering/sorting sets of data, and truncation of text without awkward word breaking), but more importantly, he detailed a number of reasons why developers should use native functions over custom code.

For one, it’s faster than solving the problem in custom code, making developers more efficient. Often, these sorts of functions also abstract away what could otherwise be long blocks of custom code, making it more readable and maintainable, especially to other developers on the team. But perhaps more importantly, using native functions provide better future proofing. If underlying changes to Craft affect how a function needs to work, there’s a much greater chance that the native function will also be updated to reflect the change, without developers needing to patch the code independently.

Awareness of these issues will help to ensure we (developers) get the most out of the tools we use, and avoid reinventing the wheel time and again. In some cases, it could mean more can be done in Twig templating (avoiding custom modules), which in turn could make it easier for less experienced team members to achieve certain functionality. However, an element of ‘just because you can, doesn’t mean you should’ applies, because when it comes to some heavier functionality, module code is often still the best solution.

———

Mark is a Cumbria lad, recently married and planning his honeymoon in Italy.

10 people around two tables in a restaurant ton the beach
A man and a woman each holding a bare buttock of a large figurine, the figurine has defecated on the floor.

Above

Senyera, the flag of Catalonia; dinner on the beach; and Holly and Dave with "El Caganer" (look it up)

Charlie reflecting on Pixel & Tonic’s talk: Dot All - State of Craft 2023

Effectively serving as the Dot All keynote speech, State of Craft 2023 covered Pixel & Tonic's range of services and products, providing both a reflection on the current range, and an insight into upcoming features.

Craft has been our CMS of choice for the best part of a decade, but we always have one eye on the rest of the market; we want to be sure that Craft is still the best CMS for our clients, not just the one we're most familiar with.

Thankfully Craft 5—planned for release in Q1 2024—demonstrates Pixel & Tonic’s continued commitment to best-in-class experiences for developers and content managers alike.

Here’s three highlights of what to expect in Craft 5…

An evolved authoring experience

Craft has long offered the ability to provide authors with a page-builder experience, using the Matrix Block field, but it's not without its limitations. Starting in Craft 5, nesting of Matrix Blocks is now possible, allowing authors to create more complex content models. This has previously been achieved using third-party plugins such as Super Table, so it's great to see the Craft community being recognised by the inclusion of this great functionality in the first-party offering.

Richer content previews with element Chips & Cards

In terminology borrowed from Google’s Material Design, Craft 5 includes richer content previews when browsing element indexes within the control panel, with the ability to view elements as Chips (title & thumbnail) or Cards (title, larger thumbnail & content snippet).

Above

Switching between chips (top) and cards for a better content browsing experience

System requirements that prioritise security

Craft 5 will require PHP 8.2 as a minimum, ensuring that it is using the latest actively supported version of PHP. This may seem like a drastic move to some, but it signals Pixel & Tonic's dedication to keeping their products up-to-date and secure. If you’re in any doubt, we’re fully on-board.

———

Charlie is a Spurs fan and Lead Developer at Ten4, currently renovating his home in Sussex.

Andy reflecting on Moritz L’Hoest’s talk: Building a Collaborative Content Platform with the Control Panel

All content-managed websites have a split between user experience (consuming content on the front end) and author experience (producing content on the back end). It’s a massive part of our job to think about the user experience of a website, but we don’t normally focus on improving author experience. In our case, Craft CMS has already done that work for us.

Moritz’s L’Hoest’s talk was about configuring and extending Craft to improve the author experience even further, specifically for authors who may not be in contact with the developers (and may not have received CMS training).

The most interesting part to me was how he leveraged standard Craft features in ways I hadn’t considered. For example, showing an explanatory welcome message widget to every user’s dashboard, or configuring a custom element source for a site-wide ‘SEO’ view of all content. He also used system hooks to change a few default Craft behaviours, like adding the ability to relate unpublished drafts to each other.

He showed off a cool custom ‘diff view’ (a side by side comparison) that visualised entry changes for every field on a letter-by-letter level — an extremely useful tool for content moderators.

I think it’s easy to overlook the author side of projects because Craft’s author experience is already so great out of the box. We often conduct user-testing for the front end but never an author-testing for the client-facing interface, so we might be missing out on ways of making their content production and management easier. (To be fair to us, we like to maintain a dialogue with all of our clients, and if there were any bugbears in the way their content management system was working, I like to think they’d let us know).

In short, Craft is extremely flexible in all respects. If developers don’t take advantage of it author-side, a certain amount of extra client satisfaction might be left on the table.

———

Andy's interests fluctuate between esoteric tech, urban self sufficiency and deep meditation, depending on the day of the week

airplane wing seen from inside a plane flying over mountains
city view of Barcelona from an elevated position with the Sagrada Familia in the distance
A rooftop pool and city view

Above

The view from the plane, the view from the cable car and the view from the hotel

Willem reflecting on Lucy Williams’s talk: Planet Saving Pixels: Creating a Web That is Good for People and the Planet

Unless you’ve been living on a different planet, you’re probably aware that this one is on fire. The climate crisis is humanity’s most vital global issue, but one industry, which on the surface might not seem like a big contributor to the problem, is often overlooked. And that industry is us.

If the internet were a country, it would be the 4th most polluting country in the world. The faster and better our internet becomes, the more energy it requires. With autoplaying videos becoming the new standard in social media, and new AI models to train, we draw ever more power and resources from networks and devices.

But, as Lucy Williams explains, developers can take practical steps to make small but vital contributions to the reduction of internet-based carbon emissions. Moreover, these changes will make our websites faster, more efficient and more user friendly. The best part is that at Ten4, we already do a lot of these things anyway.

Many quick wins are for the taking before we write a single line of code. During the design process we can ask:

  • How much content does this page really need? Sometimes less is more.
  • Do I really need a big video autoplaying on my home page? Could I achieve the same with an image instead?
  • How can I reduce the number of navigation clicks – and therefore new page loads – to get the user from point A to B?
  • Can I use darker tones or colours to reduce the user’s screen’s energy consumption?

Once we start development, there are many more things we can do to reduce overall page weight. The smaller the page, the less energy it takes to get it from server to screen. The faster it loads, the lower the drain on your device’s battery.

Steps include:

  • Utilising Craft’s built-in image transforms to make sure images are served only as big as they need to be.
  • We can build websites with less variation in fonts and font weights, and ship them in .woff2 format ensuring wide browser support and optimal compression.
  • We can lazy load images and videos, and be mindful of autoplaying content and animations, especially on landing pages.
  • We can make sure external scripts are only run on pages where they are needed.

The list goes on.

Taken individually, these steps might appear too small and insignificant to make any real difference in the climate crisis. But just like choosing the train over your car, or eating less meat, collectively, it all adds up. And your website will be better for it.

———

Willem is a Netherlands native, living in London, and often carries an Olympus XA 35 mm camera

Durra reflecting on Ben Carr's talk: A Little More Custom

When it comes to websites, both developers and content authors play important roles in enhancing user experience through quality code and content. However, the best outcomes lie in an efficient and tailored workflow, benefiting authors with an enhanced content creation experience and developers with modular, clean, and understandable code.

In his talk "A Little More Custom," Ben Carr discussed how to leverage Craft’s flexibility by writing custom modules, offering practical ways to enhance the experiences of content creators and developers. Leveraging Craft's adaptability in specific contexts not only elevates content creation and development but also streamlines tasks, data organisation, and saves time for stakeholders that would otherwise need to be involved in particular tasks.

Carr categorises Craft customisation into six areas:

  • Element Actions: Automate repetitive element-related tasks, making them accessible to non-developers through simple button clicks. For instance, synchronising external system data in real-time or requesting content updates.
  • Twig Extensions: Developers can use filters and functions to transform and output data seamlessly, keeping the main code clean and concise. Use cases include printing URLs, extracting information from strings, and more.
  • Behaviours: Developers can extend Craft's core components and add custom properties, such as formatting dates with PHP dependencies or adjusting content visibility based on user type.
  • Dashboard Widgets: Empower users to control various aspects of the website or visualise organised data. This can include content publishing schedules and managing draft entries.
  • Utility Types: Provide non-developer access to server-related actions, like checking data synchronisation with external systems.
  • Front-end Edit Links: Save content editors’ entry-search time by adding direct links on the website to the entry, enabling easy entry editing in Craft.

These are just a few examples of Craft's potential for customisation.

Currently Ten4 makes use of custom modules for (among other things), cookie consent, displaying data analytics and implementing commerce actions on Craft’s dashboard, using Twig extensions like filtering strings, and outputting urls.

Moving forward, by exploring Ten4's current Craft workflows across diverse clients, we can uncover more opportunities to enhance the content-creation process, resulting in reduced development and management time for both developers and clients, while also enhancing our clients' strategic potential through improved data processing and organisation.

———

Durra hails from Malaysia and lives in London with her cat, Sheldon.

Amelia reflecting on Lakeshia Wright’s talk: Humanizing UX Strategy for Greater Impact

Lakeshia Wright started her talk by detailing her city-planning background. She outlined similarities between planning a city and planning a digital product. A city needs to be accessible in the same way that a digital product needs to be, and by making things more accessible for people with specific needs, they often get better for those in the general population, too. She took the example of a dropped curb – vital for people using wheelchairs or those with significant mobility issues, but also very useful for children with shorter legs, parents pushing prams or tourists pulling suitcases (we’ve all been there).

Most of all, what Lakeshia wanted us to take away from her talk, is that humans deserve to be treated as humans, not users. An interesting quote she used was ‘Only drug dealers and software companies call their customers users’. That certainly stuck with me, and will do for some time. Lakeshia wanted us to move away from thinking about users, and to remember that the people we build products for are a diverse group with varying needs, backgrounds, experiences and emotions.

And yes, emotions matter too, because they might influence how someone uses a site. For instance, if someone is online and booking tickets for a show, they might be in a rush and only have time to skim a page, or they might struggle with information overload, or they might be doing several things at once. All these people benefit from good UX and good accessibility.

Only drug dealers and software companies call their customers users

What the talk gave me was a different way to think about UX — I, too, am often guilty of thinking about users, instead of humans. In practice, this means I will more carefully consider the where, why and who might be using our websites. When something works for me, that does not necessarily mean it works for everyone. We should be building our websites with equity, not equality in mind. The difference is demonstrated in an often quoted phrase — “Equality is giving everyone the same pair of shoes. Equity is giving everyone a pair of shoes that fits.”

———

Amelia lives in the Netherlands where she’s taking a break from making her own clothes to renovate her new home.

10 men and 5 women line up for a group photo at a rooftop bar

Above

The Ten4 team from left to right: Owen, Willem, Andy, Dave, Charlie, Durra, Holly, Karrie, Amelia, Laura, Mark, Aran, Andrew, Matthew and John

Profile photo of John Stewart

Speak to a Craft CMS expert Contact John