Problem/Motivation

I need to replace the default pattern for the frontpage plugin (site name based) by a simple "Home", and I had to make a custom plugin, we might as well provide a "text override property" so this task is easier.

Proposed resolution

Add a simple textfield to allow overriding the text for the home link.

Remaining tasks

  1. Write a patch - done by @pcambra in #2
  2. Add a test - done by @tom konda by #8
  3. Review and feedback - done by @mparker17 in #9
  4. RTBC and feedback - done by @mparker17 in #11
  5. Commit - done by @mparker17 in #12
  6. Release - released in 8.x-2.4

User interface changes

Adds a Text override control to the Site front page plugin that lets you change the default text (Front page of %sitename) to something else.

API changes

None.

Data model changes

Adds a sitemap_plugin_settings.frontpage.front_text_override configuration.

CommentFileSizeAuthor
#2 3308348-2.patch1.89 KBpcambra

Issue fork sitemap-3308348

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

pcambra created an issue. See original summary.

pcambra’s picture

Status: Active » Needs review
StatusFileSize
new1.89 KB
mparker17’s picture

Category: Task » Feature request

This sounds more like a feature request than a task, so I'm updating the category.

(I'm cleaning up old issues as part of a big review of open issues for #3425146: [Plan] Stable 8.x-2.0 release: thank you for your patience with me)

mparker17’s picture

Status: Needs review » Needs work

@pcambra, thank you for the contribution; and thank you for your patience with me (I've had a very busy 5 months!)

This looks like a good start, but I am not ready to merge it for two reasons:

  1. it doesn't have any tests, and we need tests so that future changes to the sitemap module don't break your website
  2. I'd prefer the machine name front_text_override instead of text_override (i.e.: because it makes this setting's relationship to the front-page-plugin clearer)

If you have the time to work on this issue, may I trouble you to make these changes, and then move this ticket back to "Needs review"? If you don't have the time to work on this issue, please let us know so that someone else can pick it up!

If you need some help writing tests, please ask in this thread, and I'll see what I can do to help.

Thank you very much!

mparker17’s picture

Issue tags: +Needs tests

Adding "Needs tests" tag.

tom konda made their first commit to this issue’s fork.

tom konda’s picture

Status: Needs work » Needs review

Reroll patch #2 and add PHPUnit test.
I fix #text output from patch #2 because it returns TRUE when empty string compares with null coalescing operator.

mparker17’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs tests +Needs issue summary update

Awesome, this looks great! Thank you @tom konda and @pcambra!

I'm going to make a very slight change to the test, but overall I think this is ready to merge!

I'm going to update the issue summary shortly so it's a little easier for people who find a link to this issue in the release notes to know what changed at-a-glance.

mparker17’s picture

Issue summary: View changes
Issue tags: -Needs issue summary update

Updating the issue summary as promised.

mparker17’s picture

Issue summary: View changes

Awesome, Testbot is happy, so I think this is ready to commit!

  • mparker17 committed 05f5d395 on 8.x-2.x authored by tom konda
    [#3308348] feat: Allow overriding text for frontpage plugins
    
    By:...
mparker17’s picture

Issue summary: View changes

Merged! Thanks everyone!

I'll look into making a new release with these changes in the next few weeks! (I'm hoping to merge #3545794: Remove unused cache, max_age configuration options in SitemapSyndicateBlock and #3545858: Migrate sitemap.settings.rss_front to SitemapSyndicateBlock's configuration; test, deprecate SitemapSyndicateBlock before making a release)

mparker17’s picture

Status: Reviewed & tested by the community » Fixed

I should also mark this issue as Fixed!

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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

mparker17’s picture

Issue summary: View changes

I've released this change in version 8.x-2.4.