You are here

README.txt in Paragraphs Sets 8

Same filename and directory in other branches
  1. 8.2 README.txt
-- SUMMARY --

The "Paragraphs Sets" module allows to create sets of paragraphs added to an
entity by default or selected while creating the entity.


-- REQUIREMENTS --

Obviously you'll need to install the "Paragraphs" module.


-- INSTALLATION --

Install as usual, see
https://www.drupal.org/documentation/install/modules-themes/modules-8 for
further information.


-- WIDGETS --

"Paragraphs Sets" currently provides one widget in addition to "Paragraphs".

  * "Paragraphs Classic (sets)": like "Paragraphs Classic" but with the option
    to configure a default set and select the paragraphs set on entity creation.


-- CONFIGURATION EXAMPLES --

There is no UI (yet?) for creating paragraph sets so you have to create the
config entities manually. Setting default values is limited (and tested only)
for primitive field types. Setting complex field values requires implementing
hook_paragraphs_set_data_alter(). See paragraphs_sets.api.php for all hooks.

  * Create a set containing a single paragraph of type "text":
    <code>
    id: ps_example_text
    label: 'Simple text (empty)'
    description: 'Simple text paragraph without values'
    paragraphs:
      -
        type: text
        data: {  }
    </code>
  * Create a set containing multiple paragraphs with default values:
    <code>
    id: ps_example_text_multiple
    label: 'Multiple paragraphs'
    description: 'Multiple paragraphs with default values'
    paragraphs:
      -
        type: text
        data:
          field_headline: 'First item'
          field_content: '<p>You may add HTML, too!</p>'
      -
        type: text_with_image
        data:
          field_headline: 'Second item'
      -
        type: text
        data:
          field_content: '<p>This is another text paragraph.</p>'
    </code>


-- CONTACT --

Current maintainers:
* Stefan Borchert (stborchert) - http://drupal.org/user/36942

This project has been sponsored by:

  * undpaul
    Drupal experts providing professional Drupal development services.
    Visit http://www.undpaul.de for more information.

File

README.txt
View source
  1. -- SUMMARY --
  2. The "Paragraphs Sets" module allows to create sets of paragraphs added to an
  3. entity by default or selected while creating the entity.
  4. -- REQUIREMENTS --
  5. Obviously you'll need to install the "Paragraphs" module.
  6. -- INSTALLATION --
  7. Install as usual, see
  8. https://www.drupal.org/documentation/install/modules-themes/modules-8 for
  9. further information.
  10. -- WIDGETS --
  11. "Paragraphs Sets" currently provides one widget in addition to "Paragraphs".
  12. * "Paragraphs Classic (sets)": like "Paragraphs Classic" but with the option
  13. to configure a default set and select the paragraphs set on entity creation.
  14. -- CONFIGURATION EXAMPLES --
  15. There is no UI (yet?) for creating paragraph sets so you have to create the
  16. config entities manually. Setting default values is limited (and tested only)
  17. for primitive field types. Setting complex field values requires implementing
  18. hook_paragraphs_set_data_alter(). See paragraphs_sets.api.php for all hooks.
  19. * Create a set containing a single paragraph of type "text":
  20. id: ps_example_text
  21. label: 'Simple text (empty)'
  22. description: 'Simple text paragraph without values'
  23. paragraphs:
  24. -
  25. type: text
  26. data: { }
  27. * Create a set containing multiple paragraphs with default values:
  28. id: ps_example_text_multiple
  29. label: 'Multiple paragraphs'
  30. description: 'Multiple paragraphs with default values'
  31. paragraphs:
  32. -
  33. type: text
  34. data:
  35. field_headline: 'First item'
  36. field_content: '

    You may add HTML, too!

    '
  37. -
  38. type: text_with_image
  39. data:
  40. field_headline: 'Second item'
  41. -
  42. type: text
  43. data:
  44. field_content: '

    This is another text paragraph.

    '
  45. -- CONTACT --
  46. Current maintainers:
  47. * Stefan Borchert (stborchert) - http://drupal.org/user/36942
  48. This project has been sponsored by:
  49. * undpaul
  50. Drupal experts providing professional Drupal development services.
  51. Visit http://www.undpaul.de for more information.