I'm using panels in og homepage (which has its own cck type "group") by invoking panels_panels_page(n) in node-group.tpl.php.

This works fine except that the panel title is overriding the og homepage title, resulting in the og group name is replaced by whatever title was specified during panel creation. I tried drupal_set_title() at the tpl level, but this does not seem to work.

Any ideas?

Comments

gracearoha’s picture

i also would be interested in how to do this

jonhattan’s picture

in the template node-groupcck.tpl.php:

print $title
  print($content);
  print panels_panels_page(1);

this shows both titles. you can put an empty title in the related panel as a workaround.

catch’s picture

Status: Active » Fixed

empty title in the panel is probably as good as this is going to get in 5.x-1.x, so marking as fixed.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

pvasener’s picture

Version: 5.x-1.2 » 5.x-2.0-beta2
Component: Miscellaneous » Panel pages
Category: support » bug
Status: Closed (fixed) » Needs review
StatusFileSize
new593 bytes
new593 bytes

This issue is still there on 5.x-2.0-beta2.
Here is a patch to panels_pages to keep the original node title is the panel page title is empty.

merlinofchaos’s picture

Status: Needs review » Needs work

I believe the current behavior is the correct behavior, since this patch could make it impossible to get a blank page title if that's what you want.

The solution here is that OG needs a proper display manager, and not to use panels pages in a way that is not quite intended. Moshe told me yesterday he has achieved some funding to write this solution, so hopefully that means it will not be that far away.

sun’s picture

#241067: Panel page titles cannot be reset from another module has been marked as duplicate of this issue. Proposed more or less exactly the same fix (but cleaner code), but related to user/% overrides, unrelated to OG. So maybe this should go in?

if ($title = filter_xss_admin(panels_page_get_title($panel_page, 'page', ''))) {
    drupal_set_title($title);
}
sun’s picture

Version: 5.x-2.0-beta2 » 5.x-2.0-beta4b
sun’s picture

By trail'n'error I just found out that a node page override (node/%) displays the node title (through panel argument) only if '%node' is set as Panel title in the Panel configuration. The page title override in the Node ID argument configuration (which I've also set to '%node') is not recognized.

sun’s picture

That is, of course, only working at all with this patch applied: #213751: $node->title removed from template variables

sdboyer’s picture

StatusFileSize
new801 bytes

And here we are, back in my favorite little circle of hell...here's hoping that this is the last round, and between your recent big patch and this one, we'll actually have this licked once and for all.

sun (or anyone else), if you could try out the patch here and let me know how it interacts with what's been set up thus far (including all the custom display titling, hiding/showing, etc) that'd be awesome. I don't really like the drupal_set_title(''), but I'm at a loss as to what else we can do to ensure that the damn thing gets hidden.

sdboyer’s picture

Status: Needs work » Needs review
sun’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new5.28 KB

Works as expected.

I re-rolled your patch and turned the test plan into a HTML file placed in a new sub-directory /tests. I know this is very far from perfect, but I still think it's better than nothing. We will need to re-test this behavior each time something in the title logic changes (and update the test plan if necessary). That's a solid test plan and also a good reminder and/or starting point for writing SimpleTests (sometime in the future).

sdboyer’s picture

Woot. Committed.

As I said on IRC, we'll keep an eye on your thoughts re: testing, it's definitely a good baseline to start from.

sdboyer’s picture

Status: Reviewed & tested by the community » Fixed

Woot. Committed.

As I said on IRC, we'll keep an eye on your thoughts re: testing, it's definitely a good baseline to start from.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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