Hi,

I created a page in the advanced_forum_group_topic_list view and overrode the title of the page. I need it to be Forum, not the name of the group. But it's still showing the group name. Is there a way to change this?

Thanks,
Mickey

Comments

mcdruid’s picture

Category: bug » support

I'd say this isn't really a bug in the module.

You say you've created a new page display for the view, and set the title for that. Have you tried setting the default title for the view?

If that doesn't work, you could try providing your own template for the display, which I think you could name views-view--advanced-forum-group-topic-list.tpl.php or views-view--advanced-forum-group-topic-list--default.tpl.php and should be based on the views template views-view.tpl.php - you should be able to do what you like with the title if the display is running through your own template.

mcdruid’s picture

Status: Active » Postponed

Looked into this a bit more, and I'm not so sure you can do what you want cleanly - that is to override the title of the topic list so that it doesn't show the forum / group name. (I'm presuming this works pretty much the same way for OG groups, which I think is what you're using if that's the view you're looking at).

The title of the page will typically be set here, I believe (in includes/core-overrides.inc):

 50   if (empty($title)) {
 51     $title = $vocabulary->name;
 52   }
 53 
 54   if (!variable_get('advanced_forum_disable_breadcrumbs', FALSE)) {
 55     drupal_set_breadcrumb($breadcrumb);
 56   }
 57 
 58   drupal_set_title(check_plain($title));

Which is inside a menu callback, so not obviously override-able.

You could try:

1) calling drupal_set_title again later on (e.g. in a theme or preprocess function) - which I think is more likely to work if you want to set it to something static like 'Forum' than if you wanted to manipulate a dynamic title.

2) just hack your hard-coded title into the code above - but that will obviously mean you'll have to be careful not to blow your changes away when you update to a new release.

If I have a chance, I may to to make this easier to manipulate / override in the theme layer; I'm marking the issue as postponed for now.

Michelle’s picture

Status: Postponed » Closed (won't fix)

It's been 7 months. I don't see this happening. :)