hal-gatewood-tZc3vjPCk-Q-unsplash.jpg

Build a Symfony app with CMS features — without leaving Symfony

Guillem

5 reading minutes

Many projects need content management features

You've probably been in this same situation: you have to create a super-custom project, with a ton of internal functionality, behind a login, but at the same time, there are a series of external pages, outside of the main application, that need to be done and, more importantly, that there's likely a marketing team that wants to manage independently.

Imagine, for example, LinkedIn. Once you enter, you see all the functionalities of the work-related social network, but before registering and logging in, there are some pages that explain everything about LinkedIn. These are the pages I'm referring to.

I know from experience that, in many cases, the development team doesn't consider the marketing needs of those pages, and they end up setting up a WordPress or similar platform for that part, decoupled from the application (and you have the application on a subdomain, for example, of the main website). And hey, I'm not going to be the one to say that's wrong. Sometimes it may be the simplest option, and both teams can focus on what they're good at, but it's not the most practical. You end up managing two different systems, two installations, servers, often on two different technologies, just because a CMS hasn't been integrated into the application to manage that part.

With most CMSs, you are the one who has to adapt.

When you work with most traditional CMSs, the content doesn't adapt to your business logic: you have to adapt to theirs. They're designed as closed platforms where you "fit" your project, not as tools that integrate with it. If your Symfony application requires specific functionality or a clean architecture, you'll soon find yourself fighting the CMS instead of building what you really need.

A clear example is Drupal .

With Drupal, you're entering a complete ecosystem that imposes its own way of doing things: its route system, its way of defining entities, its forms, its rendering layer, its permissions system... Even though it's built on Symfony components, you're not working "with Symfony," but "within Drupal."

If you already have a Symfony app and want to integrate Drupal to manage content, you'll have to set up two parallel worlds and find ways to make them talk to each other (for example, via APIs with Drupal decoupled or Headless). The same thing happens if you start with Drupal and later need more complex business logic: you end up inserting custom code into a system that isn't designed for that.

Another world is possible

I love these movie titles 😅... but yes, there are other worlds, basically integrating CMS functionalities within our own Symfony project.

What does it mean to have a CMS inside Symfony?

  • It is installed via Composer.

  • It works as a bundle or package within the project.

  • It doesn't break your routes, your templates, or your architecture.

  • You decide how it is used, how it is extended, and how it is integrated.

This last point is quite important, although in our CMS Armonic (of course, of course, we'll sell you our book later, but don't worry, it's free), we give you a logic and a structure for how to use and extend it, in reality there is a lot of flexibility.

At the very end, once we've integrated the CMS into our project, we'll have an Administration panel that displays our application's features on one side and, if we have the appropriate role, the features for controlling the CMS on the other.

You have an example of what it would be like in our standalone installation, to test Armonic.

dashboard.png

Options for integrated CMS

Okay, so we've seen a bit about why it might be interesting to have CMS functionality integrated into our project, and we've seen that we could do this with our own Armonic. But to be completely honest, it's not the only option (and it won't always be the best one, either), so let's look at some other alternatives. On the Symfony page, you'll find a ton of Symfony-based CMSs, but not all of them are easy to set up our project and have the CMS functionality integrated into it.

In other articles, we'll compare Armonic with these different CMSs to help you choose between them. For now, you can find all the information about Armonic on our website, and you can also find the technical documentation on this other page .

📫
Here’s today’s article. Feel free to reach out to us on social media as always, or at hola@softspring.es with any questions or suggestions!

Let’s work together!

Do you want to tell us your idea?

CONTACT US