Add simple blank page creation capability

Created on 14 November 2012, about 12 years ago
Updated 8 March 2023, over 1 year ago

Part of a family of issues at 🌱 [META] Decouple layouts from themes Active

Problem/Motivation

It is not possible to use the Drupal 8 layouts in any way in Drupal core now. The proposed conditional page system ( #1787942: Allow assigning layouts to pages ) was deemed a usability issue because you could not actually create pages with it, you could assign layouts to existing page patterns with conditions. Therefore we need a simpler way of just creating blank pages. The term "landing pages" has been changed to "blank page" because it is laden with connotations related to marketing conversion funnels. This issue is simply about creating one-off pages like an "about us" pages or a "Terms and conditions" page or any other stand-alone page that does not neatly match a content type or view and is not necessarily a marketing "landing page".

Proposed solution

The "free form" page entity type solves at least that half of the problem. The other half, how the user "lays out" the pages can, of course, now be handled by the theme system with twig but I think that this is not an ideal solution for site builders, managers and editors. Indeed many modules have been built to allow the site builder to "lay out" the content well. That is the cowpath we should be paving here. Providing a straightforward way for the content editor or site manager to lay out a one-off page in-place and without code.

This could be done with the following:

  1. Create the default "blank page" entity type with only a title and a body field
  2. Set the default route for content creation for entities of that type to the front end—not the admin theme—enabling the user to lay out the page as it will be displayed
  3. As an example for site builders and themers, create a twig template for the entity type in bartik theme with an edge-to-edge content region with no sidebars following the paradigm of panels
  4. Create a default view mode applied to that entity type in which the title field is tokenized and embedded into the html of the body field.
  5. Extend edit module to enable it to edit the embedded title in-place (and at a later point, possibly any field the user adds to the type)
  6. Provide a lightweight Drupal-specific plugin to CKeditor and corresponding Drupal module that makes CKblocks responsive and draggable

Admittedly this solution potentially creates a kind of "two tiered" layout system in which laying out the content well is done in a different way than laying out the regions and blocks of the site, but on a great many Drupal 7 sites that roughly mirrors the current reality. These two tasks: laying out the site and laying out a page are performed today by two different users with different skillsets therefore matching UI patterns are less important.

Note: 4 and 5 are not absolutely essential to achieve the goal but would be nice and open doors to other things. MVP ia a responsive layoutable-in-place full-width body field.

Related issues

The final will depend on capabilities introduced with #1839278: Add layout template demonstration and #1817044: Implement Display, a type of config for use by layouts, et. all , however neither is in core.

Feature request
Status

Needs work

Version

10.1

Component
Other 

Last updated about 3 hours ago

Created by

🇭🇺Hungary Gábor Hojtsy Hungary

Live updates comments and jobs are added and updated live.
  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

  • Blocks-Layouts

    Blocks and Layouts Initiative. See the #2811175 Add layouts to Drupal issue.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇷Iran abedih

    @andypost

    I don't think so. the problem with layout builder is that it is saved in the form of content an also the pages you create with layour builder are most likely NODES and they don't have fixed and absolute paths.

    this is mostly problematic when you want to transfer configuration from your development environment to production. I did not used page manager module so much but I think that is the real solution but it is very complex

Production build 0.71.5 2024