[support] Looking for a module recommendation - nested content viewable from one page

Tom Bruser ml at tombruser.com
Mon Jul 1 21:12:33 UTC 2013


Hi.

 

In an attempt to create a robust yet intuitive page authoring experience for
our content authors, I've experimented some with both the inline_entity_form
(requires EntityReference) and the fields_collection modules.  I'm looking
for advice on how to use these or other modules to accomplish the following
before diving into making a custom module.  Thank you in advance for any
replies received:

 

1.       The content author creates a new page

2.       To this page, the content author sets the page title and allowed
groups (checklist field tied to our custom module using hook_node_access).

3.       To this page, the content author adds a number of 'main' content
parts (think in terms of paragraphs), with the ability for each paragraph to
choose which of the groups they want to allow to see any particular
paragraph.

4.       The content author then sets any of up to 4 'section' titles for
corresponding additional sections which may contain the aforementioned type
of 'paragraph' content to, each 'section' having an option to set allowed
groups, and each contained paragraph also allowing an option to set allowed
groups.

 

To visualize this, the 'sections' would be rendered as separate tabs
containing paragraphs, shown below a few 'main' paragraphs.

 

Sometimes the 'paragraphs' will be authored especially for a particular
page, and sometimes the paragraphs will simply be referenced from paragraphs
which were created previously.

 

I accomplished this using EntityReference with inline_entity_form by having
3 content types, 1 for the 'page', one for a 'tab section' and one for a
'content part' (aka 'paragraph'), but I ran into the following issues:

 

a)      The inline_entity_form has some issues pertaining to nesting, but
perhaps this will be fixed soon as it seems to have been a reported issue

b)      Even with the nesting issue resolved, the way of viewing the content
in edit mode is a bit too cumbersome when pushed to this extent to make for
a good UX.  The content author sees a list of the arbitrary content titles
that they were required to add to their content parts and would have to
click 'edit' just to be able to see any of the contained actual content.
For a page with several content items, this could make for a lot of hunting
and seeking for which content item they actually wish to edit.

 

I looked at fields_collection and made fields for the content items instead
of using content types.  This way is a lot cleaner for the content author,
except I lose the ability to have the content author add existing content,
and, more importantly, I lose the ability to have the display of the content
item for site visitors obey hook_node_access implementations.

 

I've also tried nesting EntityReferences backed by inline_entity_form into
field collections. and vice-versa. each with varying 'not quite there'
results.

 

Any ideas would be appreciated.

 

Tom

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20130701/046d9c6a/attachment.html 


More information about the support mailing list