How do i insert line breaks into the description?

Hi! Hopefully this is the right place to ask this since the new site update…

I am entering text into the Description attribute, which then appears on my page list on my site, however i would like the text to have line breaks in it (either this can be denoted by a comma, or <br>) - any guidance would be appreciated! It currently is continuous text.
Thanks,
Laura

Description is plain text. Adding <br> into the page property will show up as <br> rather than line breaks in all sorts of unwanted places.

For your page list, some options:

  1. Create a custom template for the page list that takes your plain text and adds the html formatting in the view. You will have “\n” line breaks in the description text, so that could be a convenient character to replace with <br>, or to split on before wrapping each part with <p></p>
  2. Add a rich text attribute to your pages and then create a page list template to display it (or you may be able to show it with a marketplace page list variant)
  3. Use an addon such as Enlil Page Tease - concrete5
1 Like

Hello,
Please try this Myloweslife steps:

  1. Double-click the cell in which you want to insert a line break.
  2. Click the location where you want to break the line.
  3. Press ALT+ENTER to insert the line break.

Its not the thread that is spam, just this post.
We need a means of flagging individual posts as spam. I tried and inadvertently flagged the entire thread. Is there a way to undo that?

This “entire thread” does not appear to be flagged to me. Probably because I just cant see it. I successfully clicked the ••• show more button, on the above individual spam post, and clicked to flag it. That comment now appears to me with a “You flagged this as spam” note below it…

Hey! Many thanks for your reply - much appreciated.
I can see so many results on google to the questions that when clicked forward to a 404 page so i’m sorry i’m going to ask you!!

1, How do i change the plain text to html formatting?
2, do you know how to add a rich text attribute to the page?
These both sound like they could work!

Thanks so much
Laura

With the move of the concretecms sites, many searches and links are taking thier time to catch up.

In php, the nl2br() function is easiest. More sophisticated would be to explode on “\n” then loop through outputting paragraphs.

For attributes, see: Attributes

Touch Gallery is installed and some changes already done. I’m sure I’ll get a nice gallery for my customer (if you check the site, remember, its’ still on early stage). Site is built on Elemental.

But I have one question. This - as some other sites which are under work - needs sometimes to have quite a lot of information to be put in the caption. For example: “Name (of the product/object/photo)”, “year of production”, “artist/maker/designer”, “materials”, “photographer” …

Line breaks would be a great help, but I have not yet found a way to make them. Regular “return” makes a line break which shows when editing, but not anymore in gallery (= for the viewer).

So, are my attempts futile or is there a way for make line breaks?

The simplest solution while remaining with Touch Gallery (which is an excellent choice of gallery) is to create a new block template for the gallery - see block templates in the main documentation.
You can then modify your new block template to implement whatever variations in formatting or additional attribute output you require, such as changing it to do nl2br( ) on the description.

An alternative that will not involve a custom block template is my Omni Gallery - Concrete CMS. This is a more complex gallery to configure because it has many options and alternatives.

One of its capabilities is to pick a list of image properties and attributes to build a description. In the demo video, I show the ‘description’ being built from the image description and the image dimensions.

The latest version of Omni Gallery also has an option to build an ‘Extended Description’ which is assembled from attributes and properties in the same way. This can be used to show different description text between the gallery/slider and the overlay.