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.

eZ debug

Timing: Jan 30 2025 19:32:50
Script start
Timing: Jan 30 2025 19:32:50
Module start 'layout'
Timing: Jan 30 2025 19:32:50
Module start 'content'
Timing: Jan 30 2025 19:32:51
Module end 'content'
Timing: Jan 30 2025 19:32:51
Script end

Main resources:

Total runtime1.3570 sec
Peak memory usage8,192.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0049 588.1563151.2109
Module start 'layout' 0.00490.0033 739.3672220.6953
Module start 'content' 0.00831.3480 960.06254,460.5313
Module end 'content' 1.35620.0007 5,420.593811.8438
Script end 1.3570  5,432.4375 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.2558160.0002
Check MTime0.00120.0912160.0001
Mysql Total
Database connection0.00070.053410.0007
Mysqli_queries1.232590.8285570.0216
Looping result0.00080.0595550.0000
Template Total1.304096.120.6520
Template load0.00210.158020.0011
Template processing1.301895.935020.6509
Template load and register function0.00190.139410.0019
states
state_id_array0.00130.098210.0013
state_identifier_array0.00240.178120.0012
Override
Cache load0.00190.1403390.0000
Sytem overhead
Fetch class attribute can translate value0.00200.146120.0010
Fetch class attribute name0.00240.178450.0005
XML
Image XML parsing0.01461.074420.0073
class_abstraction
Instantiating content class attribute0.00000.001260.0000
General
dbfile0.01571.1543220.0007
String conversion0.00000.000440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/emphasize.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/emphasize.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezxmltags/quote.tpldatatype/ezxmltext/quote.tplextension/ezwebin/design/ezwebin/override/templates/datatype/ezxmltext/quote.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 26
 Number of unique templates used: 8

Time used to render debug report: 0.0001 secs