In projects, we often have the need to hide the display title of a Panels page. Setting the Page Title to [No Title] has the unpleasant side effect of also removing the Window Title -- the title in the browser window; head_title in Drupal html vars -- thereby killing SEO. The solution below provides a separate field to set the Window Title in Panels, which will meet the stated use case as well as allowing users to configure different text for the Window Title, for example, if a condensed/shortened title is desired.
Tokens from contexts may be used to fill in the Window Title field, but you'll need to add a Global token context to replicate the default Drupal window title format.

This is somewhat of a follow-on from #1271682: Title type should have an option to hide the title in the html but expands on the use case.
| Comment | File | Size | Author |
|---|---|---|---|
| #19 | panels-allow_users_control_window_title-2262173-19.patch | 4.04 KB | facine |
| #18 | panels-allow_users_control_window_title-2262173-17.patch | 4.02 KB | facine |
| #17 | 15-16-interdiff.txt | 1023 bytes | jwilson3 |
| #17 | panels-allow_users_control_window_title-2262173-16.patch | 4.42 KB | jwilson3 |
Comments
Comment #1
acrollet commentedpatch attached for review.
Comment #3
acrollet commentedupdated patch to apply to HEAD.
Comment #4
acrollet commentedUpdated patch with slightly improved description text and support for panelized entities.
Comment #5
jwilson3Cleaned up description and added an image screenshot of how this looks.
Comment #6
jwilson3The $msg string must be returned in the hook_update_N. Patch below fixes this.
Comment #7
jwilson3Forgot interdif from the above:
Comment #8
rodrigoaguileraworks great
Comment #9
damienmckennaYou aren't supposed to call the module's hook_schema() in an update script, so this needs to be improved.
Comment #10
jwilson3@Adrian: is instantiating the schema strictly necessary to actually add the new column?
Here is another example in docs: https://www.drupal.org/node/150215
Comment #11
damienmckennaAny reason to not just use Metatag, and maybe Metatag:Panels?
Comment #12
rodrigoaguileraMetatag is not a very light module just for this purpose
Comment #13
damienmckennaMaybe I'm over-simplying it by saying that if the site is public then you probably want the other meta tags thus Metatag would be worth adding, otherwise you wouldn't be worried about the page title?
Comment #14
joshmillerThis module here claims to do a decent job:
https://www.drupal.org/project/panel_variant_page_title
Josh
Comment #15
jwilson3This is a reroll of #4 to make it apply after the recent Panels security release.
To address #9 and #10, this patch follows the same methodology used throughout the
panels.installfile. Other commits have made it into the codebase since this patch was written that do things exactly how this patch did it.Comment #16
jwilson3Seems like a couple people are using this successfully so I'm marking it back to Needs Review, and here's hoping for a fast RTBC.
Comment #17
jwilson3I rerolled the wrong patch (#4 instead of #6) (facepalm)
Here is a proper reroll of #6, with an interdiff against #15.
Comment #18
facine commentedI've rerolled #16 to works with the last dev version.
Comment #19
facine commentedI've rerolled #18 to works with the last stable version. (3.8)
Comment #20
japerryDrupal 7 is no longer supported, closing.