Forums / Setup & design / Image popup

Image popup

Author Message

Linas Adomas

Thursday 16 June 2005 5:39:55 pm

I am new to Ez and I need help.
I have created A class that includes image field. I need to make such thing: then you click on that image it opens in popup and is much bigger. I have read some topics in forum but it didnt helped me.
I include image in to page like this:
attribute_view_gui image_class=large attribute=$node.object.data_map.image1
I tried many ways to add <a> tag but it didnt worked.
How can I send the Node Id of pressed image to the popup window? If I cold do so, I think I would solve my problem.

Ekkehard Dörre

Friday 17 June 2005 1:18:10 am

Welcome Linas,

http://www.ez.no/community/forum/developer/display_large_image_on_click_small_image

Greetings, ekke

http://www.coolscreen.de - Over 40 years of certified eZ Publish know-how: http://www.cjw-network.com
CJW Newsletter: http://projects.ez.no/cjw_newsletter - http://cjw-network.com/en/ez-publ...w-newsletter-multi-channel-marketing

Heiner Wurbs

Monday 20 June 2005 2:19:55 am

Hi, the problem is, that with this solution there are no html-tags around the image in the popup window, like e.g. a close button or copyright data.

What I did is, creating a new layout (like printlayout):

[popup_img]
PageLayout=popup_img_pagelayout.tpl

And the code for popup_img_pagelayout.tpl is:

<html>
<head>
{include uri="design:page_head.tpl" enable_link=false() enable_glossary=false() enable_help=false()}
<style>
    @import url({"stylesheets/popup.css"|ezdesign});
</style>
</head>

<body>
<a href="JavaScript:close_popup();">
	{let actual_node=fetch( content, node, hash( node_id, $module_result.node_id ))}
			{node_view_gui view=full content_node=$actual_node}
	{/let}
</a>
</body>
</html>

Calling the popup window inside the line view with the following statement:

{section show=$node_obj.object.data_map.imagelarge.content.is_valid}
{let imagelarge=$node_obj.object.data_map.imagelarge.content['original']}
<a href=JavaScript:showImg({concat("/layout/set/popup_img/",$node_obj.object.main_node.url_alias)|ezurl},"{$imagelarge.name}","{$imagelarge.width}","{$imagelarge.height}")><img src={"magnifier.gif"|ezimage} width="22" height="20" border="0"></a>
{/section}

Jazem Khalil

Monday 20 June 2005 10:45:50 pm

Hei, I am a new user , I hava use Ez systems now 2 days. I was trying the simpel intstruction of the way bulding up a popupimage, but when I use it inside the articel.tpl the page do not shows anymore with the intro or other information.

Any Way.., Its that posible to know the code how to make a image bigger in the article when a person do click on it ?

{attribute_view_gui attribute=$node.object.data_map.imagelarge image_class=articleimage align=right}

This is a image code inside a articel full template, but i want when some one do click on it to became bigger or even to popup in orginal size.

Thank you

Heiner Wurbs

Thursday 23 June 2005 3:03:53 am

Hi,
the popup is not really simple, and if you use ez only since two days, there could be many confusion in all that different ini files.

if you use the already created artcile class, then you have to redefine this class, adding the attribute "imagelarge" (as an image datatype) to it, so that data_map.imagelarge is a valid attribute.

regards,
Heiner