Closed (fixed)
Project:
Bootstrap Paragraphs
Version:
8.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
10 May 2017 at 09:21 UTC
Updated:
19 Jun 2017 at 14:12 UTC
Jump to comment: Most recent
Comments
Comment #2
bbuchert commentedComment #3
brandonratz commented@bdichgans This would require a fair overhaul of the structure currently present. I do not believe the maintainer had this in mind when developing the paragraph types as they exist currently.
To execute the desired functionality I would do the following:
1. Create a "Card" paragraph type with a paragraph reference field
2. Reference only non-layout (ie no columns) paragraph types (ie accordion, simple, etc)
3. Update the Column paragraph types to only reference "Cards" -- This will cause a card to be selected by default (via latest v. of Paragraphs)
Comment #4
thejimbirch commentedI've been thinking about this. @bdichgans and I had been discussing in the Drupal Slack, but I have not had any time to experiment.
Similar to your approach @brandonratz, I suggested that he make a "Column Wrapper" bundle that would reference any other bundle, allowing multiple. That and a custom template for it would probably work.
I am thinking this should be included in the module, but adding it is going to be another challenge. Currently the module hits the config files on install and never again. I would need to learn how to write an update hook to install a new bundle and it's fields. It's something that is on my list of things to learn, but not sure how quick I can.
Comment #5
thejimbirch commentedComment #6
bbuchert commentedSo you are planning to provide an upgrade path?
Comment #7
brandonratz commentedI will not speak for Jim on this issue but I'll share my thoughts on upgrade path.
The least abrasive path would be simply to add the "container" and not force the end user into any opinionated structure. An upgrade path would naturally exist because the "container" would be an optional paragraph type.
Comment #8
thejimbirch commentedHere is the start of my attempting to add a new bundle called "Column wrapper". Column wrapper will allow you to reference multiple paragraphs from within a column.
Trying to follow the suggestion here:
https://drupal.stackexchange.com/a/164969/13347
Using the following in the
bootstrap_paragraphs.installfileBut it's not working yet.
1) I haven't got my local to notice there is an update yet.
2) If I do, I need to write this to have all 5 of the new config files.
Working branch is on Github at https://github.com/xenomedia/bootstrap_paragraphs/tree/2877261-column-wr...
Comment #10
thejimbirch commentedThis has been committed to dev. After running the database update, a new Paragraphs bundle called Column Wrapper will be installed.
The Column Wrapper bundle allows you to add multiple Paragraphs in a single Column Content field.
If you would like to use this bundle, allow it to be selected in the Column Content field of the three Columns Paragraphs bundles. It is not added automatically.
@TODO Add to those fields in the initial config.
Comment #11
thejimbirch commentedComment #14
thejimbirch commentedComment #15
thejimbirch commentedClosed in 8.x-2.0-alpha5. Thanks all!
Comment #16
bbuchert commentedGreat! I think an example could be helpful.