So long texts are possible with the Digital Publishing Plugin!

23.09.2020
by Meike Müller
Shopware
Banner

While creating a landing page with Shopware for one of our clients, we encountered a problem with the digital publishing plugin that simply cuts off texts that are too long when the background mode is "color". Since our client and we were less than thrilled with this, we looked for a way to work around the problem. Here you can see the final CSS hack that solves the problem. For moreinformation and support for custom Shopware 5 and Shopware 6 plugins - feel free to contact us.

INITIAL SITUATION

We would like to create an element with the "Digital Publishing" plugin of Shopware itself, which has a colored background and contains a longer text. If we create this element according to schema F we will quickly notice that the text is cut off like in this image below.

Ausgangssituation Text

WHAT TO DO TO FIX THE PROBLEM

After a bit of hacking around with CSS we came up with a solution that we don't want you to miss. 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 will no longer be cut off, but will be displayed completely 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 back to our blog regularly for more posts like this.

This blog article was written by our apprentice Lennart.

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.

Show all news (81)

We also have the following interesting posts from our tech blog for you on this topic
Discover the 5 skills every good Shopware developer should have

Are you interested in Shopware and want to get started as a developer? Then we have tips for you on how to become the ultimate Shopware developer!

Our HubSpot plugin - hand in hand with Shopware - bundle the data of your store

Use our Shopware plugin between Shopware and the Hubspot universe now and benefit from easy and bundled data collection!

Shopware vs. Shopify: Which system for my online store?

We're doing the big Shopware 6 and Shopify comparison so you can find out which is better suited for your company's online store.




info@exwe.de
+49 231 93149827