Hello, I know this is an old topic. But I'd like to know if there's anything new to create a gallery in the content (not outside) with a button to select multiple images (like in WordPress) ?

Many modules make a block outside the content. I don't want this because for me it's not easy for users to understand. 

I know there is a solution with CKEditor5 and a plugin Gallery but It's a bit of work to create this.

What is the best and most intuitive in your opinion?


 

Accepted answer

When I want to have flexibility about where different components will be I use Paragraphs. IMHO they are better than Field Collections. You can have paragraphs for text, videos, gallery, or any type of field.

Most helpful answers

Batch import of images is possible with 1.34.0 of Backdrop. You may want to wait a day or so as 1.34.1 is imminent which improves the validation for that.

Comments

Tanx ! I install the module. I see the option "Enable multi-value display of fields with a grid layout", but when I'm in the content with the field, it's simply possible to load a single image, not several as expected. 

But I see a major problem, this module create a block outside the body  and I wanted to create a grid directly in body. In Drupal i used field group. This module also allows to make a field with multi fields and it's a way to laod multi images, but outside the body. 

Are you referring to the Body field itself for a node?   If so, does this mean you want something inside a wysiwyg editor like CKeditor or TinyMCE?

If you are using a separate image field, have you changed it to allow Unlimited number of values under the Global settings for that field?  (collapsed by default)

Enthusiast's picture

Just make a second text field after the gallery to insert the continuation of the text:

Default Text field
Field with Images
New Text field

Multiple repetition of the Text field / Image field can be done using Field Collection https://backdropcms.org/project/field_collection

I was thinking about this module. It works, but my goal is to offer the possibility of creating a gallery not in a particular place, but everywhere, with the possibility of changing the location or correcting easily. With this system place, i think fields are define when you create the collection. After it's not possible to change the order or to add a field as you want. I'm wrong?

Enthusiast's picture

Field Collection - This is a field containing several fields, but the set is edited once, like any other fields.

You can insert the HTML code of the gallery into the text using Jquery, after a specific number of paragraph. The task is simple - сreate a real gallery field, hide it using display: none, get and paste the field markup using Jquery into the text - a few lines of code.

When I want to have flexibility about where different components will be I use Paragraphs. IMHO they are better than Field Collections. You can have paragraphs for text, videos, gallery, or any type of field.

I'm going to be a little tiring :-) I don't like too much builders. For all the CMS (Canvas with Drupal or Elementor with Wordpress) i think they give more problems than solutions. Everyone does what they want and I know that many people used them, but I don't recommend them.

I just search a simple solution with a button to select multi images under a <div class="grid-list"></div> - No more.

I do agree that the builders you mention cause problems but I disagree that the answer is being able to put whatever you want in a body field wherever you want; that also can cause problems that don't happen when the data is stored in a structured place.

I don't think what you want is currently available with Backdrop and I'm not aware of any plans for such a thing. That doesn't make Backdrop a poor CMS; it is open source, so you can build a custom solution yourself or pay someone to do it for you.

Of course! In my opinion, BackdropCMS is one of the best CMS. I like it even if people want "WordPress" without knowing why :-) in reality, and i'm trying to propose it to my client. 
I would like to say to my client : "why wordpress ? There is Backdrop CMS" but at the moment there is 2/3 things missing. In my opinion, gallery for select multi images and wrap the in a div with grid is essential for users. 

I also have the same "reproach" with Drupal. I used other CMS like Wordpress, Publii or Jekyll and in each of them, it's possible to make gallery. Publii (great static CMS) proposes 3 ways for content. There is a integrated "paragraph" mode and a mode one paragraph with automatic <p>.

I still installed Paragraph and in reality it is less "builder" than expected.
It's just different blocks with dedicated fields. So it's a pretty good solution !
Just the batch import of images is not possible but I think I'll find a solution.

I explain what I did :

  • Install module Paragraphs of course.
  • Set for two fields or more ((galerie image) and long text) with unlimited option.
  • Take your content type, and replace the body (long text) with a new field called Paragraphs.
  • Publish a new content type. Add long text or "gallery" as you want. It's possible to re-order each part (taht the difference with field collection).
  • In CSS i have a class .field-paragraphs--galerie. I take the class .field-items and put i a simple display grid with grid-template-column and media queries .
  • It's pretty simple for those who manage CSS.
     

Batch import of images is possible with 1.34.0 of Backdrop. You may want to wait a day or so as 1.34.1 is imminent which improves the validation for that.

Enthusiast's picture

There is such a thing as a "publication format" — all publications must be made in the same style, which was developed by the designer, and the task of the editor is to fill in the provided fields, strictly according to the template. In this case, the site looks its best, and not like a "junior school student's blog".

In this case, using strictly spaced fields is the only correct solution, and this is quite enough for serious work. If the publication format requires "text / gallery / text", it is possible to create three fields for this.

If you prefer "improvisational publications" that do not adhere to the format, if you allow the editor to insert images into the text, disaster begins — you will get a "junior school student blog".

It's the reason why i refuse "builder" because finally, you have a "student blog".

But a gallery it's not a crazy thinks. All CMS propose it. Too many constraints can also scare your users away.