Forums / General / Enlarge an image located in an article once clicked...

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?

eZ debug

Timing: Jan 18 2025 21:12:42
Script start
Timing: Jan 18 2025 21:12:42
Module start 'content'
Timing: Jan 18 2025 21:12:42
Module end 'content'
Timing: Jan 18 2025 21:12:42
Script end

Main resources:

Total runtime0.0171 sec
Peak memory usage2,048.0000 KB
Database Queries4

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0076 587.8516180.8203
Module start 'content' 0.00760.0050 768.671998.0234
Module end 'content' 0.01260.0045 866.695374.7031
Script end 0.0171  941.3984 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002212.6898120.0002
Check MTime0.00105.9549120.0001
Mysql Total
Database connection0.00137.307710.0013
Mysqli_queries0.003218.865740.0008
Looping result0.00000.164120.0000
Template Total0.004124.110.0041
Template load0.00084.821810.0008
Template processing0.003319.214710.0033
Override
Cache load0.00053.120010.0005
General
dbfile0.00042.2510100.0000
String conversion0.00000.034830.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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