|
96 | 96 | {% set body_rows = [] %} |
97 | 97 |
|
98 | 98 | {% for relation in relations %} |
99 | | - {% set body_row_cols = [] %} |
100 | | - {% set col_raw_actions %} |
101 | | - {{ remove_item_btn }} |
| 99 | + {% if relation.contentInfo is not null and relation.contentType is not null %} |
| 100 | + {% set body_row_cols = [] %} |
| 101 | + {% set col_raw_actions %} |
| 102 | + {{ remove_item_btn }} |
102 | 103 |
|
103 | | - {% include '@ibexadesign/ui/component/embedded_item_actions/embedded_item_actions.html.twig' with { |
104 | | - content_id: relation.contentId, |
105 | | - location_id: relation.contentInfo.mainLocationId, |
106 | | - version_no: relation.contentInfo.currentVersionNo, |
107 | | - } only %} |
108 | | - {% endset %} |
| 104 | + {% include '@ibexadesign/ui/component/embedded_item_actions/embedded_item_actions.html.twig' with { |
| 105 | + content_id: relation.contentId, |
| 106 | + location_id: relation.contentInfo.mainLocationId, |
| 107 | + version_no: relation.contentInfo.currentVersionNo, |
| 108 | + } only %} |
| 109 | + {% endset %} |
109 | 110 |
|
110 | | - {% if relation.contentInfo is not null and relation.contentType is not null %} |
111 | 111 | {% set col_raw_checkbox %} |
112 | 112 | <input |
113 | 113 | type="checkbox" |
|
199 | 199 | class: 'ibexa-relations__item', |
200 | 200 | attr: { |
201 | 201 | 'data-content-id': relation.contentId, |
202 | | - 'data-location-id': relation.contentInfo.mainLocationId, |
203 | | - }, |
| 202 | + 'data-location-id': relation.contentInfo is defined and relation.contentInfo is not null ? relation.contentInfo.mainLocationId, |
| 203 | + }|filter(v => v is not null), |
204 | 204 | }]) %} |
205 | 205 | {% endif %} |
206 | 206 | {% endfor %} |
|
0 commit comments