Skip to content
Snippets Groups Projects

Change output for single-value text fields

2 unresolved threads

Closes #3500967

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
46 46 $element->setAttribute($key ?: $field_item_list->getName(), $attributes[$first_key]);
47 47 }
48 48 }
49 // If the element has a single slot, just add that.
49 // If the element has a single slot, just add that
50 // - explicitly as a single value, if the slot contains a single value;
51 // - otherwise, add all values from the slot.
  • Roderik Muit added 2 commits

    added 2 commits

    • f7a0f899 - 1 commit from branch project:3.x
    • a8c5af3e - Set single-value slot normalization style if applicable in DefaultFieldListProcessor

    Compare with previous version

  • 55 57 $tag = !empty($slot['tag']) ? $slot['tag'] : 'div';
    56 58 $element->setSlot($key ?: $field_item_list->getName(), $slot['content'], $tag, $attributes, $index);
    57 59 }
    60 if (count($slot_entries) == 1) {
    • this is not a good idea, since it depends on the actual data. That means, one node might end-up with a simple normalization while the second does not. But this may NOT happen. We need to be able to have a frontend component that expects the data in ONE way.

      I'd recommend moving this to a specialized processor for long-text items, such that it's turned "simple" only when the summary is disabled.

    • Please register or sign in to reply
  • Wolfgang Ziegler requested changes

    requested changes

  • Please register or sign in to reply
    Loading