You are here

README.txt in Paragraphs Sets 8.2

Same filename and directory in other branches
  1. 8 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.


-- WIDGET SETTINGS --

"Paragraphs Sets" exposes settings on the "Paragraphs EXPERIMENTAL" widget.

  * "Enable Paragraphs Sets": Whether to show the Paragraphs Sets form element
    at the top of the Paragraphs widget.
  * "Limit sets to": Restrict the sets available in the Paragraphs Sets form
    element.
  * "Default set": Use this Paragraphs Sets set as the "default value" for the
    widget. Note that the "Default paragraph type" must be set to "- None -"
    for this to work.


-- 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. -- WIDGET SETTINGS --
  11. "Paragraphs Sets" exposes settings on the "Paragraphs EXPERIMENTAL" widget.
  12. * "Enable Paragraphs Sets": Whether to show the Paragraphs Sets form element
  13. at the top of the Paragraphs widget.
  14. * "Limit sets to": Restrict the sets available in the Paragraphs Sets form
  15. element.
  16. * "Default set": Use this Paragraphs Sets set as the "default value" for the
  17. widget. Note that the "Default paragraph type" must be set to "- None -"
  18. for this to work.
  19. -- CONFIGURATION EXAMPLES --
  20. There is no UI (yet?) for creating paragraph sets so you have to create the
  21. config entities manually. Setting default values is limited (and tested only)
  22. for primitive field types. Setting complex field values requires implementing
  23. hook_paragraphs_set_data_alter(). See paragraphs_sets.api.php for all hooks.
  24. * Create a set containing a single paragraph of type "text":
  25. id: ps_example_text
  26. label: 'Simple text (empty)'
  27. description: 'Simple text paragraph without values'
  28. paragraphs:
  29. -
  30. type: text
  31. data: { }
  32. * Create a set containing multiple paragraphs with default values:
  33. id: ps_example_text_multiple
  34. label: 'Multiple paragraphs'
  35. description: 'Multiple paragraphs with default values'
  36. paragraphs:
  37. -
  38. type: text
  39. data:
  40. field_headline: 'First item'
  41. field_content: '

    You may add HTML, too!

    '
  42. -
  43. type: text_with_image
  44. data:
  45. field_headline: 'Second item'
  46. -
  47. type: text
  48. data:
  49. field_content: '

    This is another text paragraph.

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