Add "Contribution Record for" prefix to title

Created on 1 August 2025, about 1 month ago

Problem/Motivation

Title is the same as issue title. Could confuse google and people in browser history or tabs.

Steps to reproduce

Proposed resolution

Add "Contribution Record for ..." prefix.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡­πŸ‡ΊHungary GΓ‘bor Hojtsy Hungary

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

Comments & Activities

  • Issue created by @GΓ‘bor Hojtsy
  • πŸ‡ͺπŸ‡ΈSpain fjgarlin

    Adding more words to the visual title might not be desired. We might want to target only the <title> attribute if that's what Google and browser history cares about.

  • πŸ‡ͺπŸ‡ΈSpain fjgarlin

    In this case, it can be done via metatag configuration on the site.

    Config file: config/sync/metatag.metatag_defaults.node__contribution_record.yml
    Contents:

    langcode: en
    status: true
    dependencies: {  }
    id: node__contribution_record
    label: 'Content: Contribution record'
    tags:
      og_title: 'Contribution Records for [node:title]'
      title: 'Contribution Records for [node:title] | [site:name]'
    

    That translates into the following markup:

        <meta property="og:title" content="Contribution Records for Olivero: Center align content (instead of left align)" />
        ...
        <title>Contribution Records for Olivero: Center align content (instead of left align) | Drupal.org</title>
    

    And the h1 of the page is unaffected.

    Browser history:

  • πŸ‡ΊπŸ‡ΈUnited States drumm NY, US

    That makes sense to me.

  • πŸ‡ͺπŸ‡ΈSpain fjgarlin

    Great. Merged via configuration on the site.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024