Improve documentation and describe use case for home links functionality

Created on 5 April 2024, about 1 year ago

Problem/Motivation

Improve documentation and describe use case for home links functionality at
/admin/config/system/front/home-links

Should be done right there, so it's visible for side builders.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Active

Version

10.0

Component

Documentation

Created by

🇩🇪Germany Anybody Porta Westfalica

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

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

Sign in to follow issues

Comments & Activities

  • Issue created by @Anybody
  • 🇩🇪Germany Anybody Porta Westfalica

    Especially find out and document if this affects all users or only enabled roles!

  • 🇦🇺Australia elc

    This changes all instances of /<front> found by a OutboundPathProcessorInterface into the value from /front_page:home_link_path if set.

    https://git.drupalcode.org/project/front/-/blob/10.x/src/FrontPagePathPr...

    It does not limit based on users, and will trigger if front_page:home_link_path is set to anything.

    I also cannot get it to function at all. All of my links to show up as / and not /<front> meaning they just link to the normal front page set in the "Basic site settings" /admin/config/system/site-information.

    The ($path === '/<front>' || empty($path)) check might have worked back in Drupal 7, but it does not work now. The condition needs to be changed so it will actually match up to the latest core. Documentation states that:
    string $path: The path to process, with a leading slash.
    https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21PathProce...
    Meaning that the path with either be "/" or "/whatever", and never empty or "/<front>"

    Further, when testing with the rest of the Front Page module enabled, it makes for a confusing workflow. After arriving at the site and being routed based on role to your front page, all of the links that would return you to it have been replaced with the value configured in home links. It makes the front page redirect a one-shot.

    As the functionality operates in conflict with the main function of the Front Page module, Move "Home links" functionality into a submodule Active makes a lot of sense. Perhaps the functionality could be fixed and the sub-module added but only enabled when there is a value in front_page:home_link_path.

    Use case is in the situation of a splash page that all users should visit, followed by a home page that all users should be returned to when they click a home page. Without the rest of the "Front page override" enabled.

Production build 0.71.5 2024