Details
-
Bug
-
Resolution: Duplicate
-
High
-
5.1
-
None
Description
add 2 images in ezoe, next to each other. set their view mode as embed-inline.
Expected result: images display next to each other, both while editing, while viewing in backoffice and while viewing in frontend
Actual result: images display next to each other while editing, and one above the other while viewing in backoffice and while viewing in frontend.
Root cause:
- the tpl used to render the "embed" xml-tag always puts a DIV in the html around the actual embedded content. Also it seems that embed-inline.tpl is never used.
Example fix (ugly but works):
{if ne('embed-inline', $view)} <div class="{if $object_parameters.align}object-{$object_parameters.align}{/if}{if ne($classification|trim,'')} {$classification|wash}{/if}"{if is_set($object_parameters.id)} id="{$object_parameters.id}"{/if}> {/if} {content_view_gui view=$view link_parameters=$link_parameters object_parameters=$object_parameters content_object=$object classification=$classification} {if ne('embed-inline', $view)} </div> {/if}
NB: there is also the same pbl in reverse:
when editing, 2 embeds side by side are always displayed inline even when they should be shown as block-level elements
Steps to reproduce
- In an eZ Publish 5.1, with eZFlow (legacy) design
- In an article's description field insert a couple of images, side by side, setting them as inline
- In front end, open that article and verify that the images are not showed side by side