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:
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | Screen Shot 2013-03-07 at 09.43.37.png | 16.7 KB | mikespence |
| #2 | readme.png | 11.46 KB | joseffriedrich |
Comments
Comment #1
monymirzaSome Drupal Standards missing. see here:
http://ventral.org/pareview/httpgitdrupalorgsandboxtimtheenchanter190804...
Comment #2
joseffriedrich commentedHallo TimTheEnchanter!
Very nice module! I like the comments.
1. Something going wrong with your readme.txt file:
2. I would be nice and it does hurt very much if you implement a help hook (hook_help)
Dear Josef Friedrich
Comment #3
TimTheEnchanter commentedThank 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...
Comment #4
klausiWe 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 :-)
Comment #5
mikespence commentedThere's still something odd going on with your readme file?
Comment #6
lolandese commented#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.
Comment #7
PA robot commentedClosing 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.
Comment #8
TimTheEnchanter commentedFixed the readme.txt issue with the tilde. Also added project review links
Comment #9
klausimanual review:
<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.
Comment #10
TimTheEnchanter commented@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
<script>alert('XSS');</script>Comment #10.0
TimTheEnchanter commentedAdded links to project reviews
Comment #11
TimTheEnchanter commentedAdded 3 more review links. Adding review bonus tag.
Comment #12
klausiGood, 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.
Comment #13
klausino 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.
Comment #14.0
(not verified) commentedAdded 3 more reviews