Field Group Titles extends the default functionality of the Field Group module. By default when you add a field group to the display, the tab label is always going to stay the same. In the particular case that I had, I need nodes to have tabbed content with unique tab names. To do this with field groups required a new content type for each node, or a view that used contextual filters to display nodes, or some other work around. Quicktabs could do it, but that would require a unique node for each tab, and the quicktab instance is rendered as a block, not a node. None of these solutions were intuitive for content editors, so I created this module.

To put it simply, you can add a field into the display of a field group item (horizontal or vertical tab, accordion, div, fieldset) that overrides the label when the node is rendered. The user does this by adding a field of type "Field Group Title Override" to the form and display of the content type, as a child of the field group item, and if it is filled out it will become the item label on node render.

Scenario - Displaying nodes with tabbed data where the first tab is the movie title, and subsequent tabs are actors names.
Node 1

  • Die Hard
  • Bruce Willis
  • Alan Rickman

Node 2

  • Lethal Weapon
  • Mel Gibson
  • Danny Glover

Node 3

  • The Expendables
  • Sylvester Stallone
  • Jason Statham
  • Terry Crews
  • Jet Lit
  • Randy Couture

Creating that with standard field groups requires 3 nodes and 3 content types, or a view implementation. With quicktabs it would be 12 nodes and 3 blocks. By just overriding the tab label with this module it's 1 content type, 3 nodes. When you expand this example out to 100s or 1000s of nodes you can see where it becomes useful.

It's also much easier for editors, who see a standard setup in each field group, title and body.

The link to the project page is here http://drupal.org/sandbox/TimTheEnchanter/1908040

Here is my repository link
git clone --recursive --branch master http://git.drupal.org/sandbox/TimTheEnchanter/1908040.git field_group_titles

This project is for Drupal 7, I have not tested or intended this for 6.

Other projects reviewed:

Comments

monymirza’s picture

Status: Needs review » Needs work
joseffriedrich’s picture

StatusFileSize
new11.46 KB

Hallo TimTheEnchanter!

Very nice module! I like the comments.

1. Something going wrong with your readme.txt file:

Readme.txt

2. I would be nice and it does hurt very much if you implement a help hook (hook_help)

Dear Josef Friedrich

TimTheEnchanter’s picture

Status: Needs work » Needs review

Thank you both for your comments. I fixed the issues found by code sniffer, fixed the readme issue, and added a hook_help call.

http://ventral.org/pareview/httpgitdrupalorgsandboxtimtheenchanter190804...

klausi’s picture

We are currently quite busy with all the project applications and I can only review projects with a review bonus. Please help me reviewing and I'll take a look at your project right away :-)

mikespence’s picture

Status: Needs review » Needs work
StatusFileSize
new16.7 KB

There's still something odd going on with your readme file?

Screen Shot 2013-03-07 at 09.43.37.png

lolandese’s picture

#5: Looks like a commit while the readme.txt was still open in an editor.
See Prevent gedit from creating files with the '~' (tilde) suffix - Ask Ubuntu.

PA robot’s picture

Status: Needs work » Closed (won't fix)

Closing due to lack of activity. Feel free to reopen if you are still working on this application.

I'm a robot and this is an automated message from Project Applications Scraper.

TimTheEnchanter’s picture

Status: Closed (won't fix) » Needs review
Issue tags: +PAreview: review bonus

Fixed the readme.txt issue with the tilde. Also added project review links

klausi’s picture

Status: Needs review » Needs work
Issue tags: -PAreview: review bonus +PAreview: security

manual review:

  1. field_group_titles_field_formatter_view(): why do you even have to output an invisible field?
  2. field_group_titles_field_formatter_view(): this is vulnerable to XSS exploits. If I enter <script>alert('XSS');</script> as title override I get a nasty javascript popup. You need to sanitize user provided text before printing, please read http://drupal.org/node/28984 again. And please don't remove the security tag, we keep that for statistics and to show examples of security problems.

Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.

TimTheEnchanter’s picture

Status: Needs work » Needs review

@klausi

You are correct I no longer am using the hidden field so I removed it. That in turn fixes the XSS vulnerability. The output now becomes &lt;script&gt;alert(&#039;XSS&#039;);&lt;/script&gt;

TimTheEnchanter’s picture

Issue summary: View changes

Added links to project reviews

TimTheEnchanter’s picture

Issue tags: +PAreview: review bonus

Added 3 more review links. Adding review bonus tag.

klausi’s picture

Assigned: Unassigned » chx
Status: Needs review » Reviewed & tested by the community
Issue tags: -PAreview: review bonus

Good, looks RTBC now. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.

Assigning to chx as he might have time to take a final look at this.

klausi’s picture

Status: Reviewed & tested by the community » Fixed

no objections for more than a week, so ...

Thanks for your contribution,TimTheEnchanter!

I updated your account to let you promote this to a full project and also create new projects as either a sandbox or a "full" project.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and get involved!

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Thanks to the dedicated reviewer(s) as well.

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

Anonymous’s picture

Issue summary: View changes

Added 3 more reviews