-1

I've searched similar questions but I'm not sure to have understood how to do it. I would like to create a page for the team of my website. I have several blocs: administrators, moderators, etc.

I'd like to display in a left column the member avatar and on the right, I want to display all the rest of the data such as the nickname, a short description, etc.

If you have any tips on how to search on Stack Exchange, I'd gladly accept the information.

1
  • I found Panels but I don't know if it's the thing I'm searching for.
    – Helmasaur
    Jul 4, 2017 at 0:17

1 Answer 1

0

Yes, Panels is what you're looking for. Panels, in a gist, is similar to how the core Structure -> Block Layout works, except it's more powerful. You use it in conjunction with Page Manager, a submodule of Ctools (if I remember correctly) which lets you create one-off pages as well as override how core pages render. This post will explain what which does.

In summary, the workflow would be like this:

  1. Create a content type for your members. Populate it with fields for the data.
  2. Enable both Panels and Page Manager
  3. Go to Structure -> Pages and enable the Node View page (the one with the /node/% path)
  4. Edit the Node View page and add a variant - a config for what to render where, when and how when on the page's path.
  5. Configure the variant to render when viewing the content type. I think that's under Selection, then add a Type criteria matching the content type.
  6. Configure the layout of the variant. By default, there's a 1-column layout available. You can use Display Suite to provide more layouts or you can write your own.
  7. Configure the contents of the variant. Here's where the magic happens. You can virtually add anything to the layout. Views, blocks, fields, nodes, entire pages, anything. In this case, position the fields of the content type into where you want them.

That's a quick rundown of how to use Panels. And all of this happens with minimal to no coding at all (except if you create your own layout and/or add a sprinkle of CSS so things don't look very Drupal-y).

4
  • First of all, thanks for your answer! You mentionned the Blocks Layout but I never understood how this works. Is it possible to do the same thing without using Panels or is it a "obliged" modules on most Drupal projects?
    – Helmasaur
    Jul 4, 2017 at 2:33
  • @Helmasaur The other way to do it is via template overrides, which can get ugly fast. Also, if you simply want to provide a layout for content type fields, Display Suite or Field Groups (with Bootstrap Field Groups for grids) could do that. But Panels is a handy module to learn if you want greater flexibility. Once you get the hang of it, you will never look back.
    – Joseph
    Jul 4, 2017 at 3:03
  • I'm a bit scared to use modules because if it's not updated, I would get stuck with my data. I'm new with a CMS and I'm used to develop my website myself and deciding how to display pages the way I want. The most difficult thing in my opinion is to get to what you want from a "limited" tool. When I say limited, it's that you can't do it the way you want or think but do it with the possibilities that the CMS gives. I need to learn more!
    – Helmasaur
    Jul 4, 2017 at 3:08
  • It's extremely easy to use Views or Paragraphs.
    – Kevin
    Jul 4, 2017 at 3:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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