Enhancement Request - Adding Heading and Heading Link to Layout Paragraphs Section

Created on 18 June 2023, over 1 year ago
Updated 30 June 2023, over 1 year ago

Problem/Motivation

The current implementation of Layout Paragraphs in Drupal lacks a built-in feature to add a heading and a heading link at the top of a layout. This enhancement request aims to provide an efficient and user-friendly solution for incorporating headings and heading links within Layout Paragraphs.

Proposed resolution

Introduction of Heading Field:

Introduce a new field, such as "Heading" or "Section Title," to the Layout Paragraphs configuration.
The field should allow users to input a heading text for each layout instance.
Heading Link Field:

Add an optional field, "Heading Link," to the Layout Paragraphs configuration.
This field enables users to specify a link URL associated with the heading.
The field should include options for setting the target (e.g., open in new tab/window).
Integration with URL and Link Modules:

Leverage existing Drupal modules like "URL" or "Link" to handle the link field's validation and storage.
Ensure compatibility and seamless integration with other modules in the Drupal ecosystem.
Display in Layout Preview:

Render the heading and heading link within the layout preview interface.
Provide an intuitive way for users to see how the heading and link will appear within the layout.
Theming Support:

Implement appropriate theming hooks and templates to allow developers to customize the rendering of the heading and heading link.
Ensure consistent theming across different themes and provide clear documentation on how to override the default output.

Benefits:

Users can easily add headings and heading links at the top of their layouts without the need for custom coding or additional modules.
Improved user experience with a visual representation of the heading and link within the layout preview.
Flexibility for developers to customize the rendering and styling of the heading and heading link.
Impact:
This enhancement will enhance the functionality and versatility of Layout Paragraphs, providing users with a streamlined way to incorporate headings and heading links at the top of their layouts. It will improve the overall user experience and make Drupal a more powerful tool for creating complex and dynamic page layouts.

Discussion has already started in the Layout builder side :
https://www.drupal.org/project/bootstrap_layout_builder/issues/3201366
https://www.drupal.org/project/varbase_layout_builder/issues/3202087

Feature request
Status

Closed: works as designed

Version

2.0

Component

Miscellaneous

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @yabikami
  • 🇺🇸United States scottsawyer Atlanta

    Looking at the other two issues, I agree with the conclusion of the Bootstrap Layout Builder issue. I feel like layouts should be "pure" in that there is no mixing of layout definitions and the content they hold.

    Creating layouts is a fairly simple process , I feel like what you want is a custom layout, and it would be a better idea to create a custom layout than add the layer of complexity that many users may not need (I know I am not interested in this feature). Additionally, it's totally subjective as to the exact feature set that would be desired.

    That being said, I am not a maintainer, so maybe this feature is more exciting to someone who is.

  • 🇦🇹Austria hudri Austria

    I can't see any need for this at all. If you need a title field and/or link field, any user can do this in the GUI. Contrary to the other modules - because this module is based upon paragraphs - you don't even need custom YAML config, it is mouse-clickable within field UI and display modes.

  • Layouts are not fieldable, Paragraphs are inside Layout so you can't talk about field here.
    You can achieve this by creating a heading component. but it can be good if there is a way to add it to the section layout configuration.

  • 🇦🇹Austria hudri Austria

    Layout paragraphs are fieldable. They are normal paragraphs with an additional behavior field which stores the layout informaiton.

  • Understood, but your solution doesn't conform to layout logic. For example, if you were to add a field for a title, it would end up outside the section container. Consequently, styles like padding and background won't be applied to the title because it won't be a child of the layout section.
    The only simplest and viable solution for me at the moment is to create a separate paragraph bundle. If you have any other solutions, I'd appreciate hearing them.

    Thank you (Merci).

  • Status changed to Closed: works as designed over 1 year ago
  • 🇺🇸United States justin2pin

    Thanks for the detailed feature request and all the discussion here. Ultimately this functionality doesn't belong in this module... there are several other ways to handle this using other fully-developed systems in Drupal (custom fields, the theme layer, custom layout plugins, layout templates, etc.).

    I'm closing this as "works as designed".

Production build 0.71.5 2024