What this module lacks is a very basic configurable html wrapper without any appended javascript functionality. It has a group called Div with a very unexpected collapse function. maybe it should be renamed to collapsible or something.

Example form from display suite

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

yannickoo’s picture

Marked #1842472: Plain html wrapper as duplicate because this feature request looks better.

Stalski’s picture

I think we could just add a config with the most basic display-block wrappers like section, aside, div, ...
Let's summarize them first here and then I'll add it. Defaults to div so we don't break anything for existing implemenations.

Stalski’s picture

Version: 7.x-2.x-dev » 7.x-1.x-dev

Moving this to 7.x-1.x as the 2 branch is not longer supported.

yannickoo’s picture

Status: Active » Needs review
FileSize
25.67 KB
4.03 KB

So here is the patch which provides a new group type "HTML element". It provides a textfield for the element, classes and attributes. Attributes are parsed with a regex, then merged with the classes and finally processed with drupal_attributes().

Screen Shot 2013-02-25 at 22.15.54.png

loominade’s picture

Extra CSS classes? seriously? ;)

Stalski’s picture

the extra css classes are ment to add extra classes. In last dev, there are some default classes removed (and added in the default extra css classes ;) )

yannickoo’s picture

Oh okay, I just wanted create a new issue "Rename 'Extra CSS classes' to 'Extra classes'" but seems like this has been solved. What do you think about the patch Stalski?

lukus’s picture

I think this is a great idea - would it be used as a substitute for the HTML5 element type that was proposed for the 2.x branch?

yannickoo’s picture

It is very flexible so we don't need an extra HTML5 elements wrapper for that feature :)

lukus’s picture

@yannickoo

Thanks a lot for this :) I think it's great — works very well and provides a very good solution to a problem I've been faced with for some time. Would love to see this committed.

One small thing I noticed; if the class is left out, it still inserts a class attribute into the element tag. Maybe the attribute should be removed when a class isn't available?

What further steps need to be taken before this can be committed to dev?

yannickoo’s picture

Status: Needs review » Needs work

Thank you lukus, you are right that the class attribute is added even if no class is available, I will fix that tomorrow.

I guess that we have to wait for Stalski, he can tell us what is missing for committing the patch/feature.

cesareaugusto’s picture

Is this patch merged into the dev release?

yannickoo’s picture

No, that feature isn't in the dev release. There were not commits after 08/12.

cesareaugusto’s picture

Is the module unmaintained?

yannickoo’s picture

No, in the issue queue is lot activity. The maintainer is also discussing...

yannickoo’s picture

Status: Needs work » Needs review
FileSize
4.15 KB

So here is the new version. Now the $group->classes are trimmed because there is a space at the end by default and that version works fine now :)

yannickoo’s picture

+++ b/field_group.moduleundefined
@@ -411,6 +421,23 @@ function field_group_field_group_format_settings($group) {
+        '#description' => t('E.g. div, span, h2 etc.'),

We should use *real* wrappers like div, section, aside etc. Did that in attached patch.

Zach Harkey’s picture

I tested #17 over on simplytest.me and can verify that it works great.

+1 for this critical feature. It's a no brainer. Being able to designate a group of fields to display as an aside, header, footer, section, figure, etc. is huge.

jlain’s picture

+1 - Tested #17 on simplytest.me and works for me.

Hydra’s picture

Status: Needs review » Closed (fixed)

I really don't see any reason to not commit this anymore. Thank you very much yanickoo, this is an very nice and needed feature. Comitted and pushed to 7.x-1.x-dev

  • Commit c90651e on 7.x-1.x, 8.x-1.x by Hydra:
    Issue #1926938 by yannickoo: Add a configurable html wrapper