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.