Adding an image to the folder class/template.

Author Message

Armageddon Design

Wednesday 10 August 2005 4:10:37 pm

Alrighty. I've read at least 15 threads about this subject and through the documentation, but I can't find exactly what I need and I'm hoping someone here can help.

I've already edited the folder class to accept an image (in Setup/Classes/blahblahblah) but I don't know what code to add to the override/full/folder.tpl (I think that's the right template) in order to have the image show up on the page, inside of the Description so that the text can wrap around it.

Anyone have any idea?

Thanks in advance,
MJ

BTW: I'm using eZp 3.6.

http://armageddondesign.net/

Armageddon Design

Wednesday 10 August 2005 4:48:54 pm

Okay. I think I found the correct code (and am figuring out how the codes work) and I think I have it in the right spot. Here's the code:

{attribute_view_gui attribute=$node.data_map.image}

I also left out the "image_class='small'" code. Do I have to have the image_class attribute in the code? I want the image to show up the exact size I uploaded it at. Or do I need image_class to set a CSS class attribute so that I can handle the image with CSS? I'm a little confused.

Am I going in the right direction?

http://armageddondesign.net/

David Eriksson

Thursday 11 August 2005 12:48:39 am

You can use image_class='original' to make sure it shows up in its original dimensions - I'm not sure what size it picks as default if you supply none.

Check what source code your templates output, and I'm sure you can find a way to address the image with CSS. eZ is typically riddled with class definitions and divs.

/David

Armageddon Design

Thursday 11 August 2005 7:51:33 am

Thanks, David. I'll try that out.

Also, late last night, I had a brainstorm and figured out to just wrap the image code in a SPAN tag and control that with CSS.

Again, thanks!

http://armageddondesign.net/

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 31 2025 04:29:53
Script start
Timing: Jan 31 2025 04:29:53
Module start 'layout'
Timing: Jan 31 2025 04:29:53
Module start 'content'
Timing: Jan 31 2025 04:29:53
Module end 'content'
Timing: Jan 31 2025 04:29:53
Script end

Main resources:

Total runtime0.0155 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0057 588.2656151.2266
Module start 'layout' 0.00570.0026 739.492236.6797
Module start 'content' 0.00840.0056 776.171994.3125
Module end 'content' 0.01390.0015 870.484433.9922
Script end 0.0154  904.4766 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002616.5104140.0002
Check MTime0.00117.0030140.0001
Mysql Total
Database connection0.00085.039810.0008
Mysqli_queries0.002717.341630.0009
Looping result0.00000.078710.0000
Template Total0.00117.410.0011
Template load0.00095.724510.0009
Template processing0.00031.636210.0003
Override
Cache load0.00063.887810.0006
General
dbfile0.00096.042280.0001
String conversion0.00000.058640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs