Allow splitting off the front page

Created on 26 October 2024, about 2 months ago

I hear and echo the cri de coeur of whoever wrote this TODO:

// Prevent splitting this entity if it's used as the frontpage.
// @todo If this becomes a mandatory feature, we will need to write
// additional code to intercept inbound requests to `<front>` and map them
// to each corresponding entity in the correct language πŸ™ˆ.

Unfortunately my site needs separate homepage nodes for some languages, and either I add it to this module, or I write something custom for my own site. So I guess I'm volunteering to add it.

Problem/Motivation

The homepage is as likely to need soft translations as any other page. Possibly more likely.

Proposed resolution

The approach from the TODO seems sound: intercept requests for <front> and map them to the corresponding entity.

✨ Feature request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States ksenzee Washington state

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

Comments & Activities

  • Issue created by @ksenzee
  • πŸ‡ΊπŸ‡ΈUnited States ksenzee Washington state

    Actually, I wonder if using the frontpage_per_lang module is the better way to go here. The form alter for when someone tries splitting off the homepage could even suggest it, if it's not installed. We'd have to store it in config or at least k/v anyway, because if someone's using a node for their homepage without a separate path alias (which is the usual case, I think), the SoftTranslationsManager doesn't have any way of knowing which nodes are intended to be the homepage.

Production build 0.71.5 2024