other modules may want to add tabs by adding content to content['fieldgroup_tabs']. However, this module always resets this subarray so the other module's content gets lost.

I've added a patch to fix this issue.

CommentFileSizeAuthor
reset_fix.patch667 bytesLexVogelaar

Comments

nedjo’s picture

Status: Active » Needs work

Good idea.

A couple of details needed:

1. If we're doing this for node display, we should also do it on node forms.

2. Instead of redeclaring, we should test if the array key is already set and, if so, add to it:

           // Allow other modules to set a tabset.
           if (!isset(content['fieldgroup_tabs'])) {
             $node->content['fieldgroup_tabs'] = array(
               '#type' => 'tabset',
             );
           }

nedjo’s picture

Status: Needs work » Fixed

Applied a modified version, thanks.

LexVogelaar’s picture

Thanx for the fast reaction.

About point 2:

Doing the test on content['fieldgroup_tabs'] creates an assumption that 'the other module' added the #type = tabset.
I think your module should manage the root level attributes.
So in my opinion, if you want to test then test for content['fieldgroup_tabs']['#type'].

Hope that helps..
Lex.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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