Thumbnails in folder class

Author Message

Bill Rust

Friday 08 February 2008 5:34:31 am

A common request this I know but, despite reading through similar previous posts, I'm still left wondering why my request doesn't work.

I want the folder class to display images using a thumbnail attachment. I've added the option in the admin and placed the same code with which I use in the article.tpl to display thumbnail images:

{attribute_view_gui attribute=$content_version.data_map.thumbnail image_class=medium alignment=right}

But, after clearing the cache I still have nothing showing. Any clues as to where I am going wrong?

I am aware that I can add an image as a related object in the XML field but this isn't something with which I want to employ.

Stéphane Bullier

Friday 08 February 2008 6:01:06 am

Hello,

You can activate the debug to see what is wrong ?

I don't understand exactly what are you mean about "thumbnail attachment".

Stéphane

Bill Rust

Friday 08 February 2008 6:25:22 am

Hmm, yes that would help me tremendously but, dealing with a live site, I really can't think of doing that just yet.

The thumbnail attachment is just an image attribute used in my article class where I can upload an image directly from my desktop etc without first placing it first in the media folder.

Mark Marsiglio

Friday 08 February 2008 6:54:47 am

Bill - you can activate debug with limitations. For instance, you can use DebugByIP setting to enable it only for a range of IP addresses, or you can enable it by UserID (depending on your eZP version). That way, you only see the debug output when you are logged in (no one else would see it, even if they are logged in).

The other thing that would help is to use

{$content_version|attribute(show,2)}

to see where the attribute call is failing.

There is an extension that allows you to do this in debugoutput which is very helpful - it is called Dynamic Debug.

http://www.thinkcreative.com
Turning Ideas Into Strategic Solutions

Stéphane Bullier

Friday 08 February 2008 9:01:27 am

Hello,

I think you have to use fetch list :

{def $tab_article = fetch( 'content','list', hash( 'parent_node_id', 	 $node.node_id ) ) }
<ul id="galerie">
{foreach $tab_article as $elt}
	<li>{node_view_gui view='thumbnail' content_node=$elt}</li>
{/foreach}
</ul>

In folder override/templates/node/view, you write thumbnail.tpl

<img src={$node.data_map.thumbnail.content.medium.url|ezurl} alt="{$node.data_map.thumbnail.content.alternative_text|wash(xhtml)}" title="{$node.name|wash}" />

Stéphane

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