This is a great and flexible module.
However, what I immediately experience as a need in my website, is to reuse specific combinations of bundles used in a node.
What would be the best way to accomplish this? Or would this be a new feature?
This is a great and flexible module.
However, what I immediately experience as a need in my website, is to reuse specific combinations of bundles used in a node.
What would be the best way to accomplish this? Or would this be a new feature?
Comments
Comment #1
jeroen.b commentedI'm not sure what you are asking. Do you want to use the same template for multiple bundles?
You could solve this by making a base template and do a include('base-paragraph.tpl.php'); from the other bundle template.
You can also solve this by adding a theme suggestion in hook_preprocess_entity.
Comment #2
Yuri commentedThat would be an option but createing a base-paragraph.tpl.php is not something for end users to do.
What I'm looking for, is a way to make drupal remember a combination of bundles for a node.
Example:
I have a node with title "Company Research" that contains bundles History, Culture, Profitability, etc, each bundle consisting of long text fields and some other fields like tags, images etc.
I order to create multiple company research nodes for different companies, I currently need to manually add these bundles one by one, for each node again.
This is a use case that is very common in cases where you don't want to create content types or field collections for each new kind of node, but you do want the end users to be able to recreate similar node bundle combinations. Think for example about 'Lessons' and 'Courses'. You don't want the teacher to create content types or field collections for each of those hundreds of different lessons or courses. But you do want each lesson or course to be different and be re-applyable for the students.
So there are at least two common use cases: Where the end user needs to re-apply the same bundle type combinations, and when multiple end users need to re-apply the same bundle type combinations.
Basically, it can be used as a flexible alternative for content types, where the creation of fixed content types is not wanted.
I tried yesterday to create a workaround by using the 'Node Clone' module. I first created a node with a selection of paragraph bundles that would fit my 'company research' node. I left the fields empty and gave the node the title 'Company Research Template'. I then created a view listing more of such templates that included a 'clone' link. However, it appears that cloning a node does not clone the included paragraph bundles, the bundles are there but they are the same ones meaning I ended up with two nodes that contain a single set of bundles. Editing node A automatically makes text appear in node B. So this workaround does not work.
Comment #3
jeroen.b commentedYeah, I guess this would be something that content editors would like to do.
This also has to do with #2280181 of course, which you also created.
However, I rather see such specific functionality in a separate module, as it's rather quite specific functionality.
Comment #4
frans commentedCould this be partly solved by having a default selection of bundles on a new host entity (node)?
Comment #5
thommyboy commented@Yuri
Maybe I didn't get the usecases right- but "re-applying the same combination of bundles"- couldn't you use fieldcollections in multi-valued fields for that?
Comment #6
jeroen.b commentedComment #7
rv0 commentedI've built a module that allows storing default paragraphs, applying them on new nodes and applying them in batch on existing nodes.
https://www.drupal.org/sandbox/rv0/paragraphs_defaults
Looking forward to see some people test / review it.
Comment #8
miro_dietikerMight be related: #2690007: Remove drupal_render deprecated method and refactor non-functional cleanups
Comment #9
damienmckennaCould one not argue that allowing a default value for a field is a basic requirement for any field type?
Comment #10
bluegeek9 commentedUnfortunately, Drupal 7 is End of Life and no longer supported. We strongly encourage you to upgrade to a supported version of Drupal.