Forums / Setup & design / Thumbnails in folder class

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

eZ debug

Timing: Jan 18 2025 20:47:50
Script start
Timing: Jan 18 2025 20:47:50
Module start 'content'
Timing: Jan 18 2025 20:47:51
Module end 'content'
Timing: Jan 18 2025 20:47:51
Script end

Main resources:

Total runtime0.8953 sec
Peak memory usage4,096.0000 KB
Database Queries202

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0059 587.7109180.8359
Module start 'content' 0.00590.7313 768.5469605.2031
Module end 'content' 0.73710.1580 1,373.7500337.3750
Script end 0.8951  1,711.1250 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00420.4664210.0002
Check MTime0.00150.1675210.0001
Mysql Total
Database connection0.00090.095710.0009
Mysqli_queries0.804089.80122020.0040
Looping result0.00220.24972000.0000
Template Total0.867396.920.4336
Template load0.00210.232920.0010
Template processing0.865296.634620.4326
Template load and register function0.00020.023910.0002
states
state_id_array0.00110.119010.0011
state_identifier_array0.00140.151020.0007
Override
Cache load0.00180.2044300.0001
Sytem overhead
Fetch class attribute can translate value0.00140.156040.0003
Fetch class attribute name0.00120.136770.0002
XML
Image XML parsing0.00140.156440.0004
class_abstraction
Instantiating content class attribute0.00000.001880.0000
General
dbfile0.00981.0921320.0003
String conversion0.00000.000530.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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