- Recent contributors
- Recent additions
Some options for including these views in the group homepage:
- Panelizer - Panelizer 3.0 allows us to Panelize different display modes differently
- Add these views as content to be rendered along with the node with a bit of glue code
- DisplaySuite (I suggest we not introduce DS as a dependency)

| Comment | File | Size | Author |
|---|---|---|---|
| #10 | commons_groups-embedded_info_group_teaser-1782636-10.patch | 25.43 KB | gnuget |
| #8 | commons_groups-embedded_info_group_teaser-1782636-8.patch | 44.89 KB | gnuget |
| commons_groups_teasers.jpg | 95.99 KB | ezra-g |
Comments
Comment #1
ezra-g commentedFor "discussing the topics" I suggest we use as static "topics" field for now and later generate this list dynamically.
Comment #2
ezra-g commentedMoving this to the main Drupal Commons issue queue per #1812492: Consider using central issue queue for Commons projects.
Comment #3
ezra-g commentedBumping to "critical" so this gets worked on in time to avoid becoming a themeing blocker.
Comment #4
gnugetI'm going to work on this.
Comment #5
ezra-g commentedGreat! It's probably best to use Panelizer's ability to panelize different display modes to embed some views into the group teaser.
Comment #6
gnugetOks. yesterday i did a little investigation about how to complete this issue, this are the things to i will do:
- Create the views.
- Create a view mode using hook_entity_info_alter() (i'm not sure if is necessary create a new "view mode" or if i can use the "teaser" view mode without break other things).
- Create two pseudo-fields (one for each view) using hook_field_extra_fields().
- Adding the views into the pseudo-fields in the node using hook_node_view().
- Using panelizer for embed the views into the group teaser.
- Done!
In this way we avoid introduce DS as dependency and is used panelizer as you suggested.
Any thought or correction about the things to i plan to do, just let me know and i adjust the list of things to do.
Comment #7
ezra-g commentedWe should be able to re-use the "recent content in this group" block and re-use the teaser view mode for the group content type (see admin/config/content/panelizer) and place them without any field altering as default Panelized content.
It may be necessary to create a 2nd region for the views that display on the bottom - The theme can take care of floating those next to one another.
Comment #8
gnugetI embed the two views into the group node teaser page.
Also, create a view called: Commons Contributors - Group with two display, one for the groups node teaser page and one for the group homepage.
And i added a block into the group homepage page.
Something to i need to mention is the groups roles names not match with the actual roles in commons.
here https://projects.invisionapp.com/share/FW3OD3SQ#/2438205 the role is organizers and in commons the role is administrator member.
Comment #9
ezra-g commentedThanks, gnuget!
This is a great start. There are some areas that need revision:
A) Recent Content in a group view is not displaying on group teasers (there may be an issue with the argument/context)
B) The new views should be panes rather than blocks for consistency with the other views and to simpify the UI when customizing pages through Panels/Panelizer, since panes can have default config in areas such as context
C) The views created should be in the commons_groups feature and the Panelized teaser settings should be part of commons group homepages feature (rather than groups directory), since we'd expect these settings to take effect everywhere group teasers are displayed.
This separation allows folks to customize display of the group homepage and teasers by disabling the module with the Panelizer settings but re-use the blocks and views in their own feature, without overriding the underlying Commons Groups feature.
D) Less critical: there are changes to the field_bases and field_instance files in this patch. Unrelated to this issue, we need to add some features_exclude lines to the Commons Groups info file. No need to do that in this issue, but if you do git checkout commons_groups.features.field_base.inc (for example) before rolling your patch, changes to those files won't appear in the patch.
Comment #10
gnugetOks, new patch.
- This time should be displayed the "recent content" into the group teasers correctly.
- Now is used panes instead of blocks
- I move the "Commons Contributors - Group" view into commons_group and the panelizer settings are in the "group homepage feature".
- This time is i not included the commons_groups.features.field_base.inc and the commons_groups.features.field_instance.inc fields in the patch
Comment #11
gnugetComment #12
ezra-g commentedThanks, gnuget!
I ran with this and made revisions, including:
- Contributors/Topics text
- Revised image styles
- Group follow links
ay13 also did some themeing in Commons_origins to correspond with this.
http://drupalcode.org/project/commons_groups.git/commit/0b75738