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.

eZ debug

Timing: Jan 18 2025 23:16:35
Script start
Timing: Jan 18 2025 23:16:35
Module start 'layout'
Timing: Jan 18 2025 23:16:35
Module start 'content'
Timing: Jan 18 2025 23:16:36
Module end 'content'
Timing: Jan 18 2025 23:16:36
Script end

Main resources:

Total runtime0.9468 sec
Peak memory usage4,096.0000 KB
Database Queries65

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0065 587.9141152.6250
Module start 'layout' 0.00660.0040 740.539139.4453
Module start 'content' 0.01060.9345 779.9844600.1250
Module end 'content' 0.94510.0016 1,380.109412.1641
Script end 0.9467  1,392.2734 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.3830160.0002
Check MTime0.00150.1633160.0001
Mysql Total
Database connection0.00140.144810.0014
Mysqli_queries0.870691.9588650.0134
Looping result0.00090.0900630.0000
Template Total0.897194.820.4485
Template load0.00250.264720.0013
Template processing0.894694.486920.4473
Template load and register function0.00090.095610.0009
states
state_id_array0.00240.251110.0024
state_identifier_array0.00130.135420.0006
Override
Cache load0.00180.1937300.0001
Sytem overhead
Fetch class attribute can translate value0.00090.091630.0003
Fetch class attribute name0.00140.149770.0002
XML
Image XML parsing0.00610.647130.0020
class_abstraction
Instantiating content class attribute0.00000.004580.0000
General
dbfile0.01121.1837210.0005
String conversion0.00000.001040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 22
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs