Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ryan-l-robinson/drupal-profile-title-override
Drupal module that overrides titles of profiles
https://github.com/ryan-l-robinson/drupal-profile-title-override
drupal
Last synced: about 2 months ago
JSON representation
Drupal module that overrides titles of profiles
- Host: GitHub
- URL: https://github.com/ryan-l-robinson/drupal-profile-title-override
- Owner: ryan-l-robinson
- Created: 2022-06-27T14:52:00.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T19:17:19.000Z (about 2 years ago)
- Last Synced: 2024-11-06T05:13:07.400Z (3 months ago)
- Topics: drupal
- Language: PHP
- Homepage:
- Size: 384 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Overview
This provides a demonstration of configuration as well as custom code to override the title of a staff profile created with the Drupal profile module, so that the title will appear as the profile's First Name and Last Name instead of as "Staff Profile #1."
The entire Drupal configuration is provided, to [work with GitPod](https://github.com/ryan-l-robinson/Drupal-GitPod) for quick demonstration purposes.
## Custom Module
The page's title tag (that appears in the browser's header) is accomplished with custom code. It can be seen in /web/modules/custom/profile_title.
## View
The page's title that appears as a header 1 on the page is accomplished with a view block added to the profile's layout. This can be seen in multiple configuration files including:
- views.view.profile (creating the view)
- block.block.views_block__profile_block_1 (adding the custom page title block)
- block.block.olivero_page_title (removing the default page title)
- core.entity_view_display.profile.staff_profile.default (removes the first name and last name from displaying again, since it is already in the title view)