Problem/Motivation

Currently sliders paragraphs behavior returns target displays for paragraph type where it is attached. However when paragraph type holds entity ref field to other paragraphs that means that this paragraph type is a container for other paragraphs. In that case it would be much better to allow selection of view modes for paragraph types that are allowed as target.

Issue fork bs_slider-3505338

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

pivica created an issue. See original summary.

pivica’s picture

Title: Allow selection of all paragrahs displays for paragraphs slider behavior » Allow selection of all targeted paragrahs types displays for paragraphs slider behavior

First MR ready, took a shortcut:

        // TODO - return displays of only target paragraph bundles.
        // For now just return all paragraph displays until we improve this.
        if ($field_definition instanceof FieldConfig && $field_definition->getType() == 'entity_reference_revisions') {
          $displays = $this->entityDisplayRepository->getViewModeOptions('paragraph');
          break;
        }

This is more then enough for now to test this. We can improve it later ;) And seems it is working fine.

pivica’s picture

Status: Active » Needs review
pivica’s picture

Title: Allow selection of all targeted paragrahs types displays for paragraphs slider behavior » Allow selection of all targeted paragraphs types displays for paragraphs slider behavior

pivica changed the visibility of the branch 3505338-allow-selection-of to hidden.

pivica changed the visibility of the branch 3505338-allow-selection-of to active.

  • pivica committed 6569b9a0 on 1.x
    feat: #3505338 Allow selection of all targeted paragraphs types displays...
pivica’s picture

Status: Needs review » Fixed

Merged.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.