jQuery fancybox photogallery [SOLVED]

Author Message

Lo' F.

Sunday 10 October 2010 10:39:14 am

Hello there.

I integrated a jQuery fancybox to open the pictures of a photogallery.

It works but every picture has no relation with the others. In order to create a sequence of pictures so that I can browse them forward and backward gallery-like, they need to have a common rel.

How can I insert a rel attribute in here?

{attribute_view_gui attribute=$node.data_map.image image_class=gallerythumbnail link_to_image=true() css_class="picture"}

loredanaebook.it

Lars Eirik R

Sunday 10 October 2010 1:45:13 pm

If you want to be able to use a attribute_view_gui operator here, you should probably override the datatype/view/ezimage.tpl in your own extension.

Your override ezimage.tpl should then accept a parameter such as rel. If you choose not to override with your own template you will have to retrieve the actual image values in your template without using the attribute_view_gui convenience operator.

The easiest thing is for you to create your own override by putting it in your own extension /templates/content/datatype (basically copy the structure to the ezimage.tpl being called at the moment.

If your overriden ezimage.tpl checks for a set value such as rel your should be able to insert it as any variable inside the attribute_view_gui operator the same way as image_class and link_to_image is set in the default one.

You could copy the default ezimage.tpl to your own extension and add the rel attribute in this copied file.

Be sure to activate debuging and turn off all cache while developing. You really need to be able to check which templates are being rendered to figure out ezpublish:)

Lo' F.

Sunday 10 October 2010 4:26:14 pm

"

..

The easiest thing is for you to create your own override by putting it in your own extension /templates/content/datatype (basically copy the structure to the ezimage.tpl being called at the moment.

If your overriden ezimage.tpl checks for a set value such as rel your should be able to insert it as any variable inside the attribute_view_gui operator the same way as image_class and link_to_image is set in the default one.

You could copy the default ezimage.tpl to your own extension and add the rel attribute in this copied file.

..

"

..Great man! Thank you, Lars Eirik! It works!!

Just copied the default ezimage.tpl into my extension templates/content/datatype/view/ folder, added ..

{default image_class=large
          ...
          rel=''}

..

..
{if $href}<a href={$href}...{if $rel} rel="{$rel}"{/if}>{/if}
..

..

and inserted a rel attribute in the override of galleryline/image.tpl..

Thank you again!

loredanaebook.it

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