- Issue created by @useernamee
- ðŠð¹Austria fago Vienna
I dont't think we support individual views-field-formatting, you may just take over the whole entity-row rendering to go via custom-elements entity-rendering, and from there on you can use CE-UI to format individual fields.
>So no matter which formatter I set, the field is always shown as target_id when checking the view.
I see, I guess expected behaviour would be at least to get the traditional-rendered drupal markup, right? - ðžð®Slovenia useernamee Ljubljana
This issue is related to ð Use CE Generator to build View rows Needs work but it is not fixed by it.
- ðžð®Slovenia useernamee Ljubljana
In
lupus_decoupled/modules/lupus_decoupled_views/src/Plugin/views/style/CustomElements.php
entity references are not rendered as custom elements (seeelse
part). This also introduces errors for multivalue entity references because the sanatization is expects string but recieves array./** * {@inheritdoc} */ public function render() { $result = ['rows' => []]; $row_plugin = $this->view->rowPlugin->getPluginId(); $entity_view_plugin = str_starts_with($row_plugin, 'entity:'); // If the Data Entity row plugin is used, this will be an array of entities // which will pass through Serializer to one of the registered Normalizers, // which will transform it to arrays/scalars. If the Data field row plugin // is used, $rows will not contain objects and will pass directly to the // Encoder. foreach ($this->view->result as $row) { if ($entity_view_plugin) { $custom_element = $this->getCustomElementGenerator()->generate($row->_entity, $this->view->rowPlugin->options['view_mode']); } else { $custom_element = new CustomElement(); foreach ($this->view->field as $name => $value) { $custom_element->setAttribute($name, $value->render($row)); } } $result['rows'][] = $custom_element; } if ($this->view->pager) { $result['pager'] = $this->pagination($result['rows']); } return $result; }
Since field row plugin is not supported I'm not going to investigate this more.