I have upgraded my development site to the latest Panopoly release and now my page titles includes the site name. The daftest example is the contact form, which now has the title "Contact us | sitename". I've played with various options in my panels content settings, even tried the Page Title module (I see there are issues for it here so not surprised that hasn't worked). I find it hard to imagine it's an issue (hence not categorised as a bug) so any suggestions for what I've (unwittingly) done wrong?

Comments

dsnopek’s picture

Status: Active » Fixed

Hm. As far as I can think of, I don't think we changed anything in Panopoly that messes with page titles. Panelizer affects node title, but we haven't updated it yet.

Looking at the Drupal 7.38 code, it appears that template_preprocess_html() in includes/theme.inc does this. According to git blame it's been this way for a long, long time. :-)

In your own module or theme, you could definitely implement your own hook_preprocess_html(&$vars) and do $vars['head_title'] = drupal_get_title();? That should make the page title only be the page title and not include the site name.

I hope that helps!

PedroKTFC’s picture

Thanks for getting back. I think I may not have understood the terminology fully myself. The page title, as in the title metatag, is probably correct (frankly, I'm not too bothered about that). It's the title of a page as specified in the content part of a panel (I've tried overwriting with %title to no avail). In older versions, this would correctly show things like "Contact us", "Blog", "About us"; some are node titles, some are not but none had the sitename in them. Newer versions add the sitename for me (and I'm using a modified version of the responsive Bartik, nothing fancy).

I'll look at your suggestion and report back for completeness.

dsnopek’s picture

Oh, so this is the node title! That should be set by Panelizer. I've definitely never seen this on any other Panopoly site, so I suspect that some additional module is interfering...

Status: Fixed » Closed (fixed)

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

PedroKTFC’s picture

I came back to look at this again this week and finally sorted it. Thought I'd post it here as it's a bit obscure (and no idea how I did it in the first place) in case it ever happens to anyone else.

Go to Home » Administration » Structure » Panels » Settings » Panels, choose the "Everywhere" tab and in the section HEAD TITLE, the "Include the site name" option controls whether the site name is included in the title.

Phew!

[Update: some module is update is changing this setting. I don't know which but when I upgraded my sites they all reset with this setting.]

PedroKTFC’s picture

Status: Closed (fixed) » Closed (works as designed)
markh_’s picture

Thanks for the tip PedroKTFC. I spent the last hour trying to figure out why the site name was appearing in the panel title and then I came across your post.