Long texts are possible with the Digital Publishing Plugin!

23.09.2020
by Meike Müller
Shopware
Banner

When creating a landing page with Shopware for one of our customers, we encountered a problem with the digital publishing plugin, which simply cuts off text that is too long in the "Color" background mode. As we and our client were not very happy about this, we looked for a way to work around the problem. Here you can see the final CSS hack that solves the problem. For more information and support for individual Shopware 5 and Shopware 6 plugins - feel free to contact us and enjoy our article!

INITIAL SITUATION

We want to use the Shopware "Digital Publishing" plugin to create an element ourselves that has a colored background and contains a longer text. If we create this element in a standardized way, we will quickly notice that the text is cut off like in this picture below.

Ausgangssituation Text

WHAT TO DO TO FIX THE PROBLEM

After hacking around a bit with CSS, we came up with a solution that we don't want to withhold from you. First, we gave our digital publishing element the class "long-text-bg-color" so that we don't accidentally edit other elements.

DIgital Publishing

If we now add the following lines to our Less file, our text is no longer cut off, but displayed in full as desired.

Less Datei

Text unterlegt

That was the whole trick - now we can create text elements of any length with the Digital Publishing Plugin! If you found this post helpful or informative, don't forget to check our blog regularly for more posts like this. If you have any further questions about Shopware stores and web development, we will be happy to assist you as a strong partner!

This blog article was written by our trainee Lennart.

What is your project? If you want to tell us about it, we'll call you back!

 
Meike
Meike
from 23.09.2020

Hello, my name is Meike. I take care of the EXWE back office and am responsible for our social media channels. All of our articles are meant to make your life easier and help you make decisions. Nevertheless, it can happen that something remains unclear, so: If you have questions about this article you can easily reach me at +49 231 93149827.

You always want to stay at the cutting edge of technology Don't miss any more news and blog posts.
We also have the following interesting posts from our tech blog for you on this topic
Shopware Shop: Tips for Italian countries

The Shopware insert the Italian states - Use our tips and tricks about Shopware and optimize your online shop now!

How do I convert my store system to Shopware 6?

Would you like to carry out a Shopware 6 migration? We'll show you what to look out for and how to make the move a success.

Set up Google target projects for Shopware

You can find out how to set up target projects for your online store with Google Analytics and how to connect Google Analytics with Shopware here.