ezimage operator not working?

Author Message

Erik Petersen

Wednesday 16 July 2003 11:28:09 am

I am having a problem using the |ezimage template operator:

<div class="imageleft">
<img src={"file_embed.gif"|ezimage} />
</div>

in my override of template content/view/embed.tpl doesn't work and produces the uri: .../user/content/view/full/65/file_embed.gif

Any help?

Selmah Maxim

Thursday 17 July 2003 9:32:48 am

try :

<img src={"design:file_embed.gif"|ezimage} />

Erik Petersen

Thursday 17 July 2003 12:19:49 pm

<div class="imageleft">
<img src={"design:file_embed.gif"|ezimage} />
</div>

Offers up:

design:file_embed.gif

as the uri for the image.

Erik Petersen

Thursday 17 July 2003 12:27:45 pm

What is it that I'm missing here?

This document http://ez.no/sdk/kernel/view/template_operators/ says:

ezimage
Prepends the current sitedesign to the url with the image subdirectory, if the file does not exist in that design the standard sitedesign is used instead.

{"search.png"|ezimage(single)}

becomes

'/design/mydesign/images/search.png'

I was referred to that document from http://ez.no/sdk/eztemplate/view/operator_list/ which says:

ezimage
Similar to ezroot but prefixes image directory in the design.

which says:

ezroot
Similar to ezurl but does not include the index.php

Which says:

ezurl
Makes sure that the url works for both virtual hosts and non-virtual host setups.

Failing any explaination I follow the link above which says:

eZ publish kernel operators
For more information see the Kernel template operators tutorial.

which takes me to the second link I posted.

|ezimage is clearly NOT doing what the documentation says it is supposed to do. This is either a bug in ezTemplate or in the docs. Can someone help please. This is 3.1-1

Jan Borsodi

Thursday 17 July 2003 11:31:25 pm

The ezimage operator should work unless you no longer see images in the admin design. This operator is used troughout ezpublish default templates.

The major reason for it not to work in your case is that either the filename of the image is misspelled, or the image is not placed in the image subdirectory for the current or standard design.

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

Erik Petersen

Friday 18 July 2003 11:36:40 am

Thanks! I double checked and my image was named file_embed.GIF not file_embed.gif. I change the filename and it worked. Thanks for the reply!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.