Skip to content

The siteTitleFormat.includeSiteTitle setting shows site title instead of current page title (instead of My Website - Home Page, My Website) #8353

Description

@silviubogan

Describe the bug

In the link below, navRootTitle is the title of the page, never the title of the site, but still it is used in this way:

const titlePart = navRootTitle || siteRootTitle;

If I comment out like this: /* navRootTitle || */, it works well.

Without this comment, since the titlePart !== title condition:

if (includeSiteTitle && titlePart && titlePart !== title) {
return seo_title || `${title} ${titleAndSiteTitleSeparator} ${titlePart}`;
} else {
return seo_title || title;
}

is not met, the tab title is made of the website title alone.

To Reproduce
Steps to reproduce the behavior:

  1. Create a Cookieplone project
  2. In the add-on install function, put
    config.settings.siteTitleFormat.includeSiteTitle = true;
  3. See the wrong tab title in the browser's Volto tab.

Expected behavior

I expected that the tab title contains both the website title and the current page title.

Software (please complete the following information):

  • OS: Windows (WSL)
  • Browser: Edge
  • Volto Version 19.1.4
  • Plone Version 6.2.0
  • Plone REST API Version: unknown

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions