Forums / Setup & design / Adding an image to the folder class/template.

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/

eZ debug

Timing: Jan 19 2025 00:12:46
Script start
Timing: Jan 19 2025 00:12:46
Module start 'content'
Timing: Jan 19 2025 00:12:47
Module end 'content'
Timing: Jan 19 2025 00:12:47
Script end

Main resources:

Total runtime1.2727 sec
Peak memory usage4,096.0000 KB
Database Queries197

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0076 588.9766180.8125
Module start 'content' 0.00761.1262 769.7891550.6016
Module end 'content' 1.13380.1388 1,320.3906337.0547
Script end 1.2726  1,657.4453 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00420.3321210.0002
Check MTime0.00150.1180210.0001
Mysql Total
Database connection0.00110.089510.0011
Mysqli_queries1.198094.13671970.0061
Looping result0.00220.16961950.0000
Template Total1.241897.620.6209
Template load0.00220.171520.0011
Template processing1.239697.404220.6198
Template load and register function0.00020.011910.0002
states
state_id_array0.00090.068810.0009
state_identifier_array0.00120.095320.0006
Override
Cache load0.00180.1427240.0001
Sytem overhead
Fetch class attribute can translate value0.00120.093730.0004
Fetch class attribute name0.00090.072550.0002
XML
Image XML parsing0.00270.213730.0009
class_abstraction
Instantiating content class attribute0.00000.001170.0000
General
dbfile0.00430.3372270.0002
String conversion0.00000.000630.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
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 17
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs