eZ Community » Forums » Developer » Displaying images embedded in XML...
expandshrink

Displaying images embedded in XML block fields

Displaying images embedded in XML block fields

Thursday 28 March 2013 11:20:04 am - 8 replies

Hello,

I am on ezpublish 5 and I have troubles displaying the images embeded in my XML block fields.

In my templates I use twig's ez_render_field function to render the XML blocks in the templates, and all the text renders fine, but the image embedded from the CMS interface don't show at all (instead I have a "Image" plain text output instead of the image).

I can see the images from the admin interface, they are displayed in the field previews, but I can't find a way to show them in my templates.

Did any of you have the same problem, or eventually do you have another way to show the embedded images in ezpublish 5 ?

Thanks !

Monday 06 May 2013 11:57:33 am

Hello Grégory,

Have you found a solution ? I have exactly the same issue. The image are not display in front office, instead of there is a link to the image. 

I use the 2013.4 version and I'm connect with the admin account.

Romain

Thursday 13 June 2013 3:43:00 pm

Hello,

I am on ezpublish 5 also, i had exactly the same problem and i fixed it by adding the following code of templates overrides into override.ini.append.php file.

[image_embed]
Source=content/view/embed.tpl
MatchFile=embed/image.tpl
Subdir=templates
Match[class_identifier]=image
 
[image_embed-inline]
Source=content/view/embed-inline.tpl
MatchFile=embed-inline/image.tpl
Subdir=templates
Match[class_identifier]=image
 
[image_embed-inline_node]
Source=node/view/embed-inline.tpl
MatchFile=embed-inline/image.tpl
Subdir=templates
Match[class_identifier]=image

Modified on Thursday 13 June 2013 3:44:16 pm by Omar Achoor

Friday 11 July 2014 11:33:49 am

I have the same issue as well, however, creating the above config in override.ini.append.php didn't solve my problem. It had an impact however. Before integrating those configuration lines I had a link (to the "full" view of the image) and now I only have an empty paragraph or div, depending on the use of "embed" / "embed-inline".

Romain, did this configuration solved your problem?

I still encounter the same issue with 2014.1 and 2014.3.

Patrick

Friday 11 July 2014 11:57:56 am

Ok, I had 2 things to do: first adding the template override rules above, but also activate the "base" design which is not activated by default (eZ Publish bug?). To activate it I had to add the following in site.ini.append.php:

[DesignSettings]
AdditionalSiteDesignList[]=base

Tuesday 02 September 2014 4:41:13 pm

Hello,

add this config,  in your override.yml file.

 content_view:
                embed:
                    image_embed:
                        template: "YourController:embed:image.html.twig"
                        match:
                            Identifier\ContentType: image

Thursday 03 September 2015 12:40:09 am

Hi,

which parameter do I get when i override the image_embed?

I have the same issue using EE 5.3 

Friday 04 September 2015 9:05:20 pm

The override does NOT work and the legacy override gave me... something.
At least a tag:
<p><img src="/" alt=""></p> 

Modified on Friday 04 September 2015 9:09:20 pm by Johannes Kurz

Tuesday 13 October 2015 11:53:10 am

Worked like a charm for me.

Once I added the config yml and duplicated the image.html.twig from DemoBundle I was able to see the image.

 

Let me know if you still have problems with it.

Will gladly help.

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from