Hi,

Thank you for this wonderful module! I've run into a small snag. I have 2 types of nodes that are groups and would only like the 1 type (groups) to override the home page, but in the case of type 2 (projects) only to show as a tab.

Is that by chance possible please?

Looking forward to any reply.
Lilian

Comments

brianV’s picture

Version: 6.x-2.x-dev » 6.x-3.x-dev

Bumping version since 6.x-2.x is no longer being developed.

paul2’s picture

Version: 6.x-3.x-dev » 7.x-2.x-dev
Component: User interface » Code

This is exactly the feature I need, as well, and is the only thing preventing us from using Homebox for our Drupal-based distance learning environment. A Drupal 7-compatible version of this feature would be preferred!

adf1969’s picture

StatusFileSize
new4.85 KB

Attached is a patch (against 7.x-2.0-beta6) that I think will add what you are looking for (It also includes a patch to the .install file that forces homebox_og to have a weight *after* page_manager, since if it doesn't, it can be overridden).

I am using this code and so far it works just fine. If you don't ever set any custom homeboxes for the Content Types, it just defaults to the "default" action; if you do, it can either override them or *prevent* override.

Let me know if you have any questions. The mod only took me about 2 hrs to write/test.

Andrew.

paul2’s picture

Status: Active » Needs work

Awesome - thanks Andrew! My only comment is that the selections for each group type seem to only be respected if the Override group homepages (Action to take when Default selected below) option is set to something besides "- None -". I think the group type-specific options should always be respected—whether or not you want a default homebox for groups in general.

adf1969’s picture

StatusFileSize
new5.6 KB

paul2:
You are correct. I only fixed the alter code, but did not add new code to *ensure* the _menu_alter() hook is called.
Attached patch fixes that.

Thanks for catching this bug.

kaizerking’s picture

is this working ?
any reviews please?

kaizerking’s picture

@adf1969
I got this error on og group configuration page:
Warning: Invalid argument supplied for foreach() in homebox_og_group_settings_page() (line 146 of E:\wamp\www\sites\all\modules\homebox\homebox_og\homebox_og.module).

blainelang’s picture

@adf1969, the foreach error occurs when you have no homepages yet created - should create a new issue.

drumm’s picture

Project: Homebox - Individual user dashboards » Homebox OG
Version: 7.x-2.x-dev » 7.x-3.x-dev
Issue summary: View changes