building an image gallery

building an image gallery

Monday 05 January 2004 9:20:09 am - 2 replies

Author Message

Paul Borgermans

Monday 05 January 2004 10:26:27 am

If you want a popup, best use some simple javascript mixed with template code like

-----------------------------------------------
....
<h3><a href="#">Preview <img src={"viewmag+.gif"|ezimage} onClick='OpenWindow({$node.object.data_map.preview.content[original].full_path|ezroot},"image_preview","scrollbars,resizable");'></a></h3>

------------------------------------------------------

you will probably need to change preview to the attribute name of your image.

viewmag+.gif is just an icon i borrowed from a KDE distribution and converted to gif (for IE transparancy)

the OpenWindow javascript function called is found in the default pagelayout in the demo's:

<script language="JavaScript">
<!--

function OpenWindow ( URL, WinName, Features ) {
popup = window.open ( URL, WinName, Features );
if ( popup.opener == null ) {
remote.opener = window;
}
popup.focus();
}

// -->

</script>

hth

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

mihnea stoian

Tuesday 06 January 2004 7:05:54 am

thanks for the answer, but unfortunately it doesn't work for me. :(

{$node.object.data_map.preview.content[original].full_path|ezroot} doesn't seem to display anything, so there is no url to open the new window with.

your example included the same image as thumbnail for all the pop-ups. I'd like to be able to use ImageMagick to display a small thumbnail of the image, and when I click on this small image to open the bigger version of the same image.

could that be easily achieved? also, where can I find some sort of reference to all the eZpublish commands available?

thanks again,

mihnea

You must be logged in to post messages in this topic!

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