Problem/Motivation

The Artisan starterkit's footer has no built-in copyright notice. Site builders currently have to hardcode copyright text directly in Twig templates, which means manually updating the year every year and duplicating effort across sub-themes.

There is no way to configure pre-text (e.g. "Copyright") or post-text (e.g. a site name or "All rights reserved") without editing template files directly.

Proposed resolution

Add two new theme settings to the Artisan theme settings form:

  • copyright_pre_text — text displayed before the year (e.g. "© Copyright")
  • copyright_post_text — text displayed after the year (e.g. "My Site. All rights reserved.")

The current year is resolved dynamically in the template so it never needs manual updating, the footer template then renders:

{{ copyright_pre }} [year] {{ copyright_post }}

Both fields are optional. If left empty, the block renders nothing (or only the year, depending on site builder preference).

Issue fork artisan-3588715

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

frouco created an issue. See original summary.

sahana _n made their first commit to this issue’s fork.

sahana _n’s picture

Status: Active » Needs review

I created MR. Please review.

sahana _n’s picture

StatusFileSize
new374.75 KB
frouco’s picture

Status: Needs review » Reviewed & tested by the community

Some corrections have been made to adapt it to the theme's particularities. A prop was also added to the footer to display the copyright string.

  • frouco committed 769f3432 on 3.x authored by sahana _n
    Issue #3588715: Added configurable copyright text with dynamic year to...
frouco’s picture

Status: Reviewed & tested by the community » Fixed

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

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

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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