Why we built QR codes into TYPO3: Bringing print campaigns under CMS control

|Jochen Roth
Multiple hands hold QR codes while one hand uses a magnifying glass to examine a larger QR code in the center.

Last year, my colleague Florian opened an issue on the TYPO3 tracker. The situation he described was simple: Marketing teams generate QR codes on random websites, paste in a link, then download the image. The QR code lives on a poster or brochure somewhere in the physical world, completely disconnected from the CMS.

The problem is that the page then gets moved. Or deleted. Or the campaign ends. Suddenly, that printed QR code leads nowhere, and someone’s scrambling to create a redirect and hoping they get the path right.

Florian’s issue came with a detailed spec for how this could work better. When I saw it on our list for the October sprint in Geneva, I knew I wanted to pick it up. The feature itself made obvious sense, but I was also excited about the technical challenge: integrating a modern web component into the TYPO3 backend and extending the redirects module in a way that could be useful beyond just QR codes.

The Problem With Disposable QR Codes

Most organizations handle QR codes like this: Someone in marketing needs a code for a trade show banner. They google “QR code generator,” find a free tool, paste in the URL, and download the image.

This is a fine workflow for the short term. But it creates problems down the road. That QR code now exists independently of the website it points to. Nobody in the CMS knows it exists. There’s no record of who created it or why. And when the target page changes—which it will—the code breaks.

Florian had seen this repeatedly with clients. They’d contact support saying a QR code was broken, only to find that it had stopped working because the page had been restructured months ago. Visitors were landing on a 404 page, and the only fix was to create a redirect after the fact and hope you’d guessed the right source path.

The deeper issue is that printed materials need to be as manageable as any other link in your system. But QR codes created outside the CMS exist in a blind spot.

Building on What TYPO3 Already Does Well

Our approach was shaped by a simple insight: TYPO3’s redirects module already solves most of this problem. Redirects let you point one URL at another, change the target whenever you want, and track how often people hit them. QR codes are essentially the same thing—a fixed entry point that routes to a flexible destination—just with a visual representation you can print.

So rather than building something entirely new, we extended the redirects module. This required some groundwork first. The redirects database table wasn’t set up to handle different types of records displayed in different ways. We added that capability, creating a foundation where redirects and QR codes share the same underlying power but present different interfaces. An inspired developer could extend this even further by adding custom features, new redirect types, or even tiny URLs.

The QR code itself is generated by a custom web component. You pass in size and content parameters, and it handles everything else.

What Editors Can Do Now

Creating a QR code takes two fields: domain and target. You can use TYPO3’s standard link picker to point at a page, a file, or an external URL.

Once created, the QR code’s URL is fixed. That’s what gets printed. But the target can change anytime. Has your campaign ended? Point the code to your homepage or the next campaign. Was your page restructured? Update the target and every printed code keeps working.

The module shows you what matters for managing codes over time: total scans, unique scans, creation date, and who created it. When someone asks, “What’s this QR code for and is anyone still using it?” you can actually answer them.

You can set availability windows—start and end dates—so codes automatically stop working when they should. And you can download the image in PNG or SVG at various sizes, depending on your print production needs.

For redirects and QR codes alike, we’ve added visibility into which user created each record. If you’re wondering why a redirect exists or where a QR code was used, you can find the person who made it and ask.

For Developers: A Reusable Component

The QR code generator is also a self-contained web component available anywhere in the TYPO3 backend. If you’re building an extension and want to display a QR code, just take the markup, then pass in size and content parameters. The component handles server communication and rendering.

A colleague already sent me a patch using exactly this approach: adding QR code downloads to backend preview links. You generate a preview URL for a client, and now you can hand them a QR code to scan instead of copying a long link. That’s the kind of reuse we designed for.

The type system we built for this is also extensible. We split the redirects table into different display types—one for redirects, one for QR codes—each with their own interface but sharing the same underlying capabilities. If you wanted to add a third type—say, tiny URLs—the pattern is there to follow.

Two Fields And Done

My focus throughout was simplicity. Most of the time, someone just needs a QR code for a specific page. They shouldn’t have to think about it. Pick a domain, pick a target, then download.

But underneath that simplicity is real flexibility. Change targets when campaigns evolve. Track usage to know what’s working. Keep print materials valid for years by managing them the same way you manage any other link.

QR codes are now part of TYPO3 Core as of version 14.1, grouped with redirects under Sites → Link Management.

Print materials finally have a place in the CMS!

You want to try out the QR code module?

Download TYPO3 v14.1, to test the QR code module or contact b13, to discuss how our TYPO3 expertise can help your project.