combine sections slideshow

Author Message

Martin Ulrich

Tuesday 06 April 2004 10:26:41 am

for an idiot like me, who never learned any basics its a problem:

for my javascript- slideshow I want the path to the image and separate count of the image

that should be the result:
[1] Number = var/storage//var/gallery/storage/images-versioned/... 1.png
[2] Number = var/storage//var/gallery/storage/images-versioned/... 2.png
[3] Number = var/storage//var/gallery/storage/images-versioned/... 3.png

the following loops me the path of image - (works fine, no problem):

      slide=fetch( content, tree, hash( parent_node_id, $node.node_id,
											limit, $image_limit,
                                            offset, $view_parameters.offset,
                                            class_filter_type, include,
                                            class_filter_array, array( 'image' ),
                                            sort_by, array( 'published', false() ) ) )
{section var=image loop=$slide}
{$image.item.data_map.image.content[small_h].full_path}
{/section}

And the following loops me the image count - dito no problem:

number=fetch( content, list_count, hash( parent_node_id, $node.node_id,
                                            limit, $image_limit,
                                            offset, $view_parameters.offset,
                                            class_filter_type, include,
                                            class_filter_array, array( 'image' ),
                                            sort_by, array( 'published', false() ) ) )
{section var=image loop=$number}
[ {$image} ]
{/section}

But what I want is, these both result in one line, like:
[1] number = var/storage/var/gallery/storage/images-versioned/... 1.png

I havent any idear what i should write. How is it possible to fetch two different arrays together, resp. loop two results in one line.
How to combine these two results in one line?
Perhabs I have to combine the two sections somehow, but dont know how.

perhaps there is a nice human beeing out there, who gives a tip.

thanks in advance. :-)

Greetings Sebastian

_______________________

http://artenic.de ARTENIC - Publishing mit allen Mitteln!

Martin Ulrich

Tuesday 06 April 2004 10:31:50 am

The following, two functions, for example does NOT work:

slide=fetch( content, tree, list_count hash( parent_node_id, ...

_______________________

http://artenic.de ARTENIC - Publishing mit allen Mitteln!

Tore Skobba

Tuesday 06 April 2004 11:03:07 am

Hi

I am not sure what you want. But you can not count each image, or you can count it, but it would always be one and as such not make much sense.
>
>slide=fetch( content, tree, list_count hash( parent_node_id,
>
This will not work, as you basically are asking for two values, the number of children and an array with all the children (including children children etc.. tree).

fetch (content, tree_count, hash (... will return the number of children, including childrins childrens etc.
fetch (content, list_count, hash (.. will return the number of children of THIS node
while
fetch (content, tree OR fetch (content, list will return an array with all the objects.

Hope it helps, if not you need to elobrate on your problem.

If you want to count each image then one solution could be like this
{let count=0
images_list=fetch (content, tree, ...)
}

{section loop=$images_list}
{set i=i:inc} (Increase i with one for each image)
{$item.data_map.image.content[small_h].full_path}
<p>Image number: {$i} </p>
{/section}
{/let}
Note, it is pseudo code and does not work as it is.

Cheers
Tore

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 19 2025 13:53:18
Script start
Timing: Jan 19 2025 13:53:18
Module start 'layout'
Timing: Jan 19 2025 13:53:18
Module start 'content'
Timing: Jan 19 2025 13:53:18
Module end 'content'
Timing: Jan 19 2025 13:53:18
Script end

Main resources:

Total runtime0.6986 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0059 589.1563152.6250
Module start 'layout' 0.00590.0043 741.781339.4453
Module start 'content' 0.01030.6869 781.2266517.2422
Module end 'content' 0.69720.0013 1,298.468812.1641
Script end 0.6985  1,310.6328 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.4590160.0002
Check MTime0.00130.1799160.0001
Mysql Total
Database connection0.00110.153610.0011
Mysqli_queries0.609087.1754570.0107
Looping result0.00040.0538550.0000
Template Total0.641091.820.3205
Template load0.00240.346720.0012
Template processing0.638691.416620.3193
Template load and register function0.00010.015910.0001
states
state_id_array0.00150.209710.0015
state_identifier_array0.00060.088720.0003
Override
Cache load0.00200.2815490.0000
Sytem overhead
Fetch class attribute can translate value0.00050.067020.0002
Fetch class attribute name0.00060.084530.0002
XML
Image XML parsing0.00020.035720.0001
class_abstraction
Instantiating content class attribute0.00000.005330.0000
General
dbfile0.02072.9659100.0021
String conversion0.00000.001440.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/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
12content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
8content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 27
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs