1

For a larger article content type on a Drupal 8 page, I want to have the following structure:

Title Image/Video

Body (the normal node body with the title and some text)

A contanct block

Paragraphs

For the title image/video I'm not sure yet whether I want to simply create 2 different article types or find some magic to do either the one or the other, but that's fine.

The body that comes next, will just follow as is and contain some introductional text. I guess, I have to write my own template to be able to place the image before the title, but that'll work.

Then, I want a simple block that contains some simple contact information (probably the same block in every article).

Then, there should follow a paragraphs field that'll hold several paragraphs for the rest of the article.

Do you have any ideas how I could place this block?

Thank you in advance for your help :)

2

Enable "Layout builder" module first. On "Manage display" in entity config Default "Custom display" enable "Full content", then go there and enable "Use Layout builder" and "Allow each content item to have its layout customized."

This will give you "Layout" tab in each node (of this type where you enable this in config) for ex. - how to arrange each field of this entity, also ability to add custom block, user fields, etc. If you want Contact form there you should probably have to write custom block in custom module and put the form inside - just to have it for placement from the Layout builder.

  • 1
    Ohyeah, that's pretty awesome! I didn't know that this is possible and like it really much! Great stuff :) – Byom the Great Jan 22 at 12:28
0
  1. Install the Block field module
  2. Create a paragraph type "Drupal block"
  3. In that paragraph type, create a new field using the field type from the new module

Now you can place any block within the main content area just like an ordinary paragraph.

  • This means, I can place the block by hand as the first paragraph, am I right? Would there also be a way to place this block automatically? Because actually I don't want to let the block appear during authoring the article. – Byom the Great Jan 22 at 12:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.