2017 © Pedro Peláez
 

drupal-module wmcontent

Adds configurable content 'containers' to entity types (for eg.paragraphs)

image

wieni/wmcontent

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  • Monday, July 2, 2018
  • by Wieni
  • Repository
  • 8 Watchers
  • 0 Stars
  • 1,066 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 3 Open issues
  • 51 Versions
  • 28 % Grown

The README.md

wmcontent

Latest Stable Version Total Downloads License, (*1)

Adds configurable entity containers to entity types (for e.g. paragraphs), (*2)

Why?

In Drupal 7 we noticed a couple of shortcomings with the Paragraphs module (that are still not solved in Drupal 8 AFAWK)., (*3)

  • Backend performance improvements: Paragraphs creates a widget within the default entity edit forms. This did not only clutter the interface when using > 10 paragraphs, the form itself would regularly become too large and break any decent PHP memory setting on submitting/saving. This module provides a separate tab for its content, instead of mixing it in with the node edit form through inline entity forms or similar solutions.
  • Frontend performance improvements: The paragraphs of an entity are loaded separately from the standard entity data, which solves memory issues when displaying a lot of entities on a page.
  • UI improvements: Features like cloning/duplication of paragraphs as well as drag and drop sorting of paragraphs become easier when not integrated in the default entity edit form.
  • More flexibility: This module allows multiple lists of paragraphs (containers) to be attached to entities, where one can limit the available entity types and bundles on a per-container basis. This allows for e.g. a Content tab and a Program tab for activity/event content types.

Installation

This package requires PHP 8.1 and Drupal 10.0 or higher. It can be installed using Composer:, (*4)

 composer require wieni/wmcontent

How does it work?

Terminology

  • A container connects hosts of a certain type to children of a certain type.
  • A host is an entity with containers, e.g. a node with a paragraph container. A host can have multiple children per container.
  • A child is an entity attached to a host through a container, e.g. a paragraph. Every entity can only be attached to a single container.

Children and hosts can be entities of any type with a canonical route, implementing Drupal\Core\Entity\ContentEntityTypeInterface., (*5)

When updating a child entity, the changed time of the host entity is updated as well., (*6)

Get started

Before you begin, make sure your user role has the administer wmcontent permission. After that, you can get started by creating a new container. You can do this by going to /admin/config/wmcontent/containers or by following the Structure > WmContent > WmContent Containers menu link., (*7)

After creating the container, go to the (edit) page of a possible host entity. A new tab should have appeared with the name of the container you just created., (*8)

Clicking that link brings you to the master form, where you can add children to and edit/delete/reorder children from this host., (*9)

Displaying children

If you use Display Suite to build your pages, you can use the WmContent: Content blocks field to display the content of the children entities on a host., (*10)

You can change the way wmcontent containers are rendered by overriding the wmcontent theme implementation., (*11)

If you build your pages manually using Twig templates, you can load the children of a host using WmContentManagerInterface::getContent., (*12)

Changelog

All notable changes to this project will be documented in the CHANGELOG file., (*13)

Security

If you discover any security-related issues, please email security@wieni.be instead of using the issue tracker., (*14)

License

Distributed under the MIT License. See the LICENSE file for more information., (*15)

The Versions

02/07 2018

dev-release/0.4

dev-release/0.4

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

02/07 2018

0.4.17

0.4.17.0

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

28/06 2018

dev-feature/0.4/content-block-access-checks

dev-feature/0.4/content-block-access-checks

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

21/06 2018

0.4.16

0.4.16.0

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

17/05 2018

0.4.15

0.4.15.0

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

08/05 2018

0.4.14

0.4.14.0

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

06/04 2018

0.1.2

0.1.2.0

  Sources   Download

06/04 2018

0.1.3

0.1.3.0

  Sources   Download

06/04 2018

0.1.4

0.1.4.0

  Sources   Download

06/04 2018

0.1.1

0.1.1.0

  Sources   Download

12/03 2018

0.4.13

0.4.13.0

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

12/12 2017

0.4.12

0.4.12.0

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

12/12 2017

0.4.11

0.4.11.0

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

27/11 2017

0.4.10

0.4.10.0

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

23/11 2017

0.4.9

0.4.9.0

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

14/11 2017

0.4.8

0.4.8.0

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

14/11 2017

0.4.7

0.4.7.0

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

14/11 2017

0.4.6

0.4.6.0

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

09/09 2017

dev-fix/0.4/wmcontent-operation-links-multilingual

dev-fix/0.4/wmcontent-operation-links-multilingual

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

07/08 2017

0.4.5

0.4.5.0

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

07/08 2017

dev-fix/update-parent-host-on-contentblock-insert

dev-fix/update-parent-host-on-contentblock-insert

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

01/08 2017

0.4.4

0.4.4.0

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

01/08 2017

dev-fix/v0.4/fix-undefined-method-getContentBlocks

dev-fix/v0.4/fix-undefined-method-getContentBlocks

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

11/07 2017

0.4.3

0.4.3.0

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

11/07 2017

dev-feature/0.4/wmcontent_weight

dev-feature/0.4/wmcontent_weight

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

29/06 2017

0.4.2

0.4.2.0

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

29/06 2017

dev-fix/v0.4/call-to-undefined-method-hostclearcache

dev-fix/v0.4/call-to-undefined-method-hostclearcache

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

14/06 2017

0.4.1

0.4.1.0

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

14/06 2017

dev-fix/v0.4/isContentBlock-typeError

dev-fix/v0.4/isContentBlock-typeError

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

13/06 2017

0.4.0

0.4.0.0

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

29/05 2017

dev-release/0.3

dev-release/0.3

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

29/05 2017

0.3.4

0.3.4.0

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

29/05 2017

0.3.3

0.3.3.0

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

29/05 2017

0.3.2

0.3.2.0

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

29/05 2017

dev-hotfix/0.3/better-titles-in-blocks

dev-hotfix/0.3/better-titles-in-blocks

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

04/05 2017

0.3.1

0.3.1.0

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

03/05 2017

0.3.0

0.3.0.0

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

16/02 2017

dev-release/0.2

dev-release/0.2

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

16/02 2017

0.2.6

0.2.6.0

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

15/02 2017

0.2.5

0.2.5.0

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

08/02 2017

0.2.4

0.2.4.0

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

24/01 2017

0.2.3

0.2.3.0

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

24/01 2017

0.2.2

0.2.2.0

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

24/01 2017

dev-hotfix/0.2/better-label

dev-hotfix/0.2/better-label

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

13/01 2017

0.2.1

0.2.1.0

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

23/12 2016

0.2.0

0.2.0.0

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

22/12 2016

dev-release/0.1

dev-release/0.1

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

22/12 2016

0.1.11

0.1.11.0

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

29/11 2016

0.1.10

0.1.10.0

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

29/11 2016

0.1.9

0.1.9.0

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni

17/11 2016

0.1.8

0.1.8.0

Adds configurable content 'containers' to entity types (for eg.paragraphs)

  Sources   Download

MIT

by Avatar Wieni