Nice module, thanks.

Would it be possible to only display the field collection items as tabs if there is more than one item? I.e. if there is only one item leave out the tab ui?

Comments

larowlan’s picture

Status: Active » Postponed (maintainer needs more info)

So what would happen here with the title field?
Would we just not add the javascript that transforms the markup into a tabset and leave it as two unordered lists?

gaele’s picture

StatusFileSize
new13.83 KB
new10.53 KB

The title field (label) would be just a normal field item, so no list markup at all.

Single tab:
Single tab

Two tabs:
Two tabs

gaele’s picture

Status: Postponed (maintainer needs more info) » Active
jamsilver’s picture

Status: Active » Needs review
StatusFileSize
new5.79 KB

OK, I needed this functionality so here it is - patch attached!

There are two new options on the formatter config form:

1. Hide tabs for single values - withholds the tab markup or javascript if there is only a single value in the field,
2. Hide title field when tabs are hidden- withholds the title field when only a single tab-less value is shown.