How to reach a thumbnail uploaded with an article

Author Message

John Mina

Wednesday 25 February 2004 1:00:30 am

HI everyone,
i have a problem that i need to reach the thumbnail that was uploaded with the article, ot print it in a specific palce in the page according to my design.
I used the code "{$thing:item|attribute(show)}" to knwo the object's attributes and found somethign called thumbnail as an attribute, but i couldn't print it out using "{$thing:item.thumbnail}", and the debug told me that there is nothing named thumbnail as an attribute of the object.

Do any body have any idea of hwo to know the attribute name and how print it out?
Sincerely

Tore Skobba

Wednesday 25 February 2004 2:16:03 am

With Thumbnail you mean an image? Right? You know it might also be an image size. Well if it is an image then use this to display it.

{* Check to see if there is an actual image *}
{section show=$node.data_map.thumbnail.content.is_valid}
{* There is an image display it *}
{attribute_view_gui attribute=$node.data_map.thumbnail image_class=small}
{/section}

OR alternatively you could use
{section show=$node.data_map.thumbnail.content.is_valid}
<img src={$node.data_map.thumbnail.content.small.url|ezroot} />
{/section}

Note: "small" is an image filter used to resize the image to size small, i.e. image_class=small and content.SMALL.url, could very well be content.large.url depending upon your filters defined in override/image.ini.append

cheers
Tore

John Mina

Wednesday 25 February 2004 4:26:58 am

Hi Tore
please let me thank you
it took a day long from me searching this.
it worked and in a great manner
but hey
that will lead me to ask you about something else which is :- how to devide up the rest of attributes, and how to get the list of diff attributes and know how to extract them from the database

Thnx
John

Tore Skobba

Wednesday 25 February 2004 8:33:54 am

Hi

You're welcome, sound like you should read some docs thought. Check out the good EZ tutorial at: http://www.ez.no/ez_publish/documentation/toc/(from)/36647. If only something like that had been available when I started.

In order to show attributes the function attributte_view_gui is very nice, simply in your node templates do: {attribute_view_gui attribute=$node.data_map.ATTRIBUTENAME}. Alternatively you can access the "direct" content with: {$node.data_map.ATTRIBUTENAME.content}.

Cheers
Tore

John Mina

Wednesday 03 March 2004 5:20:45 am

HI Tore
seems I was a bit ate recieveing your last reply, Actuall yi read most of that building toutorial, it hel;ped me a lot but i felt lost in some where i nthe mid. so i stoped and went on what i have to do.
I have a problem now regarding variable "%1" that when written between the braces of eztpl code it write down the name of the current node.
I want to know abotu the other %... stuff as it seems there is %2 that write down NEW "node name" and ineed to customise that.
IF you have any requests regarding arabic letters please let me know.

I need also an advice regarding building the site on an ez publish that i downloaded as a full package that is downloaded with an installer, i mean is there a problem buiding my site this way ?
I am askign that much cuz i feel u can really help
thaks a ltof or being so generous,
Sincerely John Mina

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 19 2025 07:27:30
Script start
Timing: Jan 19 2025 07:27:30
Module start 'layout'
Timing: Jan 19 2025 07:27:30
Module start 'content'
Timing: Jan 19 2025 07:27:31
Module end 'content'
Timing: Jan 19 2025 07:27:31
Script end

Main resources:

Total runtime0.7875 sec
Peak memory usage4,096.0000 KB
Database Queries63

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 589.3047152.6406
Module start 'layout' 0.00580.0027 741.945339.4766
Module start 'content' 0.00850.7776 781.4219503.6797
Module end 'content' 0.78620.0013 1,285.101612.1250
Script end 0.7875  1,297.2266 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.4384160.0002
Check MTime0.00140.1792160.0001
Mysql Total
Database connection0.00070.087710.0007
Mysqli_queries0.735393.3653630.0117
Looping result0.00050.0646610.0000
Template Total0.756296.020.3781
Template load0.00260.328520.0013
Template processing0.753695.694520.3768
Template load and register function0.00020.025610.0002
states
state_id_array0.00080.099810.0008
state_identifier_array0.00060.074820.0003
Override
Cache load0.00220.2755470.0000
Sytem overhead
Fetch class attribute can translate value0.00050.069120.0003
Fetch class attribute name0.00080.099850.0002
XML
Image XML parsing0.00020.028120.0001
class_abstraction
Instantiating content class attribute0.00000.001450.0000
General
dbfile0.00070.0827100.0001
String conversion0.00000.001140.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
10content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
12content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 29
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs