Fix views pane title override

Created on 25 September 2023, over 1 year ago

Problem/Motivation

Not sure why this was never implemented, but there's an option when creating a ctools Views pane to override the title. A checkbox exists in "Allow settings" that is titled Title override. Currently in the code, the pane title is set by default as the value of $block->title, but there are no options to change it.

Steps to reproduce

Implement a ctools Views pane, and select to use Title override as an Allow setting. After the view is built, add the pane to a Panels page. In the settings menu, there is no option to override the title.

Proposed resolution

See the attached patch. This should take care of the issue by allowing $block->title to be overridden if a value is set.

Remaining tasks

Please review and provide any feedback, thanks.

πŸ› Bug report
Status

Closed: works as designed

Version

1.0

Component

CTools Views

Created by

πŸ‡ΊπŸ‡ΈUnited States ron_s

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

Comments & Activities

  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 7.x + Environment: PHP 8.0 & MySQL 5.7
    last update over 1 year ago
    59 pass
  • Issue created by @ron_s
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 7.x + Environment: PHP 8.0 & MySQL 5.7
    last update over 1 year ago
    59 pass
  • πŸ‡ΊπŸ‡ΈUnited States ron_s

    Looked at this a little more and realized it should be handled the same way as path_override. Now have separate title and title_override configuration values.

    See attached, thanks.

  • Status changed to Closed: works as designed over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States ron_s

    Ok, have investigated this further and going to close the issue. Looks like the problem is the views cache needs to be cleared if the title override setting is changed. If the cache isn't cleared, the default title override option won't be shown.

Production build 0.71.5 2024