Enlarge an image located in an article once clicked...

Author Message

Kamil Kube

Thursday 20 January 2005 5:07:31 am

Hi, a few month ago a user asked this one, but no answer has been found... Is it possible?!?

Here it goes:
"When I related a imgage to an article, it always appears quite small. Is it possible that I can click to enlarge those images? Thank you very much for helps."

Thanks, Kamil

Sven Berg Ryen

Thursday 20 January 2005 6:13:08 am

Sure, it's possible.

(I'll assume that you have the knowledge of how to achieve this through plain HTML/Javascript in my answer).

What I'd do, is create a separate pagelayout for displaying images in popup windows, and access the pagelayout through /layout/set/<your_layout>/ . Let's say you use "pagelayout_popup.tpl" for this purpose.

I think the layout needs be set in layout.ini.append.php .

To avoid having the window open full screen, you might include a javascript either on the page with the link, or in the pagelayout that opens in a new window.

Inside the pagelayout_popup.tpl file, instead of including $module_result.content, like you normally would, fetch the node and use attribute_view_gui to display the image, only this time with a different size.

HTH!

Cheers,

Sven Ryen
sven.ryen at maxus.no

Kamil Kube

Thursday 20 January 2005 6:27:44 am

Sorry, forget to mention that we still use EZ 2.2.9. Is it also possible here?

Sven Berg Ryen

Thursday 20 January 2005 7:41:13 am

I have no clue. Have you considered upgrading to 3.5? What kind of site are you running?

Cheers,

Sven Ryen
sven.ryen at maxus.no

Kamil Kube

Thursday 20 January 2005 8:42:50 am

No, unfortunately this is not possible because of our company policy. It's an intranet page.

Eivind Marienborg

Thursday 20 January 2005 10:03:12 am

You could try linking to the original image file, like this:

{attribute_view_gui attribute=$node.object.data_map.thumbnail href=concat('http://www.SITENAME.COM/',
$node.object.data_map.thumbnail.content.original.url)}

Kamil Kube

Tuesday 25 January 2005 2:27:10 am

Eivind -- thanks a lot but your suggestion looks like V 3.x code. What I need is a solution for 2.2.x. Any further idea, perhaps?

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.