Forums / Developer / jQuery fancybox photogallery [SOLVED]

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

eZ debug

Timing: Jan 18 2025 02:12:22
Script start
Timing: Jan 18 2025 02:12:22
Module start 'content'
Timing: Jan 18 2025 02:12:23
Module end 'content'
Timing: Jan 18 2025 02:12:23
Script end

Main resources:

Total runtime0.9338 sec
Peak memory usage4,096.0000 KB
Database Queries194

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0069 588.8672180.8359
Module start 'content' 0.00690.7277 769.7031558.1484
Module end 'content' 0.73460.1991 1,327.8516336.7422
Script end 0.9337  1,664.5938 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00540.5760210.0003
Check MTime0.00240.2535210.0001
Mysql Total
Database connection0.00080.088310.0008
Mysqli_queries0.845790.56661940.0044
Looping result0.00200.21591920.0000
Template Total0.899996.420.4499
Template load0.00250.270820.0013
Template processing0.897396.092120.4487
Template load and register function0.00010.012810.0001
states
state_id_array0.00090.095910.0009
state_identifier_array0.00110.112520.0005
Override
Cache load0.00230.2455390.0001
Sytem overhead
Fetch class attribute can translate value0.00260.283630.0009
Fetch class attribute name0.00150.156750.0003
XML
Image XML parsing0.00210.228430.0007
class_abstraction
Instantiating content class attribute0.00000.001560.0000
General
dbfile0.00750.8021330.0002
String conversion0.00000.000630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 26
 Number of unique templates used: 8

Time used to render debug report: 0.0002 secs