Image Nightmare

Image Nightmare

Thursday 10 February 2005 3:03:24 pm - 15 replies

Author Message

Marko Žmak

Thursday 10 February 2005 3:31:38 pm

You HAVE to override:

content/view/embed.tpl

Try finding it somewhere on the complete template list. You'll probably have to list few pages, but you'll find it.

As for the documentation, you're right, it is poor.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Simon Phillips

Friday 11 February 2005 12:15:47 am

Thanks for your reply.

I currently have an override on /content/view/embed.tpl:

The override matches class_identifier : image
It currently contains a copy of the contents of the ezimage.tpl file from within the admin overrides - as suggested elsewhere. However, as you can see from the template trace above, it's never invoked - it seems that for some reason, /content/view/embed.tpl - or my override - is never being touched. Which would explain why they're not appearing. <i>But why?!</i>

Simon

bisk

Friday 11 February 2005 1:29:14 am

I think this should work:

...

<div class="imageleft">
{attribute_view_gui attribute=$node.object.data_map.image.content.data_map.image image_class=medium}
</div>

...

-------------------------------
http://www.kookfijn.nl & http://www.magento.be

Simon Phillips

Friday 11 February 2005 1:50:33 am

Thanks! You are an utter <b>lifesaver</b>! That works beautifully.

So, if I understand correctly, ez wasn't able to determine the object class, and so wasn't rendering it using the correct template. Does anyone know why? Is my setup dodgy? Or should I always reference images with

{attribute_view_gui attribute=$node.object.data_map.image.content.data_map.image image_class=medium}

I believe I just copied and pasted code from the examples and tutorials here...

Thanks again,
Simon

Martin Crockett

Friday 11 February 2005 3:14:25 am

It's like group therapy...
It appearing to working for my problem (9/2/2005) also...

Roy Bøhmer

Friday 11 February 2005 3:18:33 am

To me it looks like your attribute is an object link, and the image you want to display is in the object you linked to.

$node.object.data_map.image refers to the attribute that contains the image-object. The last part (content.data_map.image) refers to the actual image.
At least this is the case when I use the syntax :-)

Roy

Marko Žmak

Friday 11 February 2005 5:55:18 am

This line worked for me:

{attribute_view_gui attribute=$node.object.data_map.image}

Have you tried clearing the cache. Also some cache directives can sometimes prevent some templates from loading. Try putting this line I suggested, clear all the cache and if then doesn't work try turning of completely the cache. If that doesn't work, I don't know what's the problem.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Simon Phillips

Friday 11 February 2005 6:16:44 am

I had tried clearing the cache, disabling the cache, enabling the cache, enabling debugging, disabling debugging, etc, etc... It's pretty much a clean install (manual one at that) with little else on top.

Fortunately the suggestion to use the longer attribute worked.

Now I'm stuck trying to understand the menu system... I need something like the thing on the right of here - a nice tree-based menu listing all nodes below a particular depth... but it's not working yet!

Cheers,
Simon

Łukasz Serwatka

Friday 11 February 2005 6:33:07 am

settings/override/image.ini.append.php

[ImageMagick]
IsEnabled=false

Clear the cache

What phpinfo says about GD library?

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Simon Phillips

Friday 11 February 2005 7:05:18 am

Making those changes to remove ImageMagick unfortunately make no difference at all - I'm still getting just a link.

Both GD and ImageMagick are installed - and working. The files are being uploaded and resized fine in the storage area; They're just not being correctly templated by ez.

Łukasz Serwatka

Friday 11 February 2005 7:14:47 am

What is your output from

{attribute_view_gui attribute=$node.object.data_map.image}

or

{attribute_view_gui attribute=$node.data_map.image}

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Łukasz Serwatka

Friday 11 February 2005 8:45:32 am

Optionaly you can use this

<img src={$node.data_map.image.content['medium'].url|ezroot} 
width="{$node.data_map.image.content['medium'].width}"
 height="{$node.data_map.image.content['medium'].height}" border="0"
 alt="{$node.data_map.image.content['medium'].text|wash(xhtml)}"
 title="{$node.data_map.image.content['medium'].text|wash(xhtml)}" />

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Simon Phillips

Saturday 12 February 2005 4:47:57 am

Hi Luke,

I tried the following code, testing all of your suggestions:

<div class="imageright">
1:{attribute_view_gui attribute=$node.object.data_map.image.content.data_map.image}
2{attribute_view_gui attribute=$node.object.data_map.image}
3{attribute_view_gui attribute=$node.data_map.image}
4:<img src={$node.data_map.image.content['medium'].url|ezroot} 
		width="{$node.data_map.image.content['medium'].width}"
		 height="{$node.data_map.image.content['medium'].height}" border="0"
		 alt="{$node.data_map.image.content['medium'].text|wash(xhtml)}"
 title="{$node.data_map.image.content['medium'].text|wash(xhtml)}" />

</div>

with an image named "War and Greed", it came up with the following. As you can see, the longer {attribute_view_gui attribute=$node.object.data_map.image.content.data_map.image} code worked, but not any of the other versions...

<div class="imageright">
1:

    
        
    
    <img src="/var/gv/storage/images/media/images/war_and_greed_banners/257-2-eng-GB/war_and_greed_banners_large.jpg" width="256" height="287"  border="0" alt="Banners for 'war' and 'greed'" title="Banners for 'war' and 'greed'" />

    
    
    2   
<!-- START: including template: design/standard/templates/content/view/text_linked.tpl (design/standard/templates/content/view/text_linked.tpl) -->
<p class="small">design/standard/templates/content/view/text_linked.tpl</p><br/>
<a href="/media/images/war_and_greed_banners">War and Greed Banners</a>
<!-- STOP: including template: design/standard/templates/content/view/text_linked.tpl (design/standard/templates/content/view/text_linked.tpl) -->
3   
<!-- START: including template: design/standard/templates/content/view/text_linked.tpl (design/standard/templates/content/view/text_linked.tpl) -->
<p class="small">design/standard/templates/content/view/text_linked.tpl</p><br/>
<a href="/media/images/war_and_greed_banners">War and Greed Banners</a>
<!-- STOP: including template: design/standard/templates/content/view/text_linked.tpl (design/standard/templates/content/view/text_linked.tpl) -->
4:<img src="" 
		width=""
		 height="" border="0"
		 alt=""
 title="" />

</div>

Simon

Mark De Quidt

Saturday 12 February 2005 5:15:28 am

Warning: this is NOT a solution ;)

I installed ezPublish yesterday, after installing ImageMagick. During the initial "fine tuning", ImageMagick was detected, but the first gallery in the default setup "plain", did not show any image. I reinstalled ezPublish (purging and recreating the db), no change.

Rather discouraging: if a standard setup does not work, and it is so difficult to show a stupid flower... why should i investigate further? At the moment, I do not understand this all thread, it seems to me I need a lot of study, it seems to be you need to be an expert from the beginning.

www.AtheneumAntwerpen.be
www.OpenLeren.be

Marko Žmak

Saturday 12 February 2005 3:50:37 pm

It looks to me something strange is happening with your eZ. This code:

{attribute_view_gui attribute=$node.object.data_map.image}

works perfectly for me, haven't got a clue why it shouldn't. Maybe someone from eZ crew could give you a better answer.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

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

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