Fetch on single keyword and random objects

Author Message

Tore Skobba

Tuesday 11 January 2005 2:07:26 pm

Hi

I am making an personnal website at http://www.skobba.com (non dynamic). I there have several images in various folders, each image have several customized keywords. I would like to list up the releated images for each keyword (instead of ALL releated images to the image). Exampe:

Keyword: house, three, boat

Boat
img 1
img 2
Three
img9
etc.. Currently I only manage to get an list of ALL the reletaed images, but I want them grouped on each keyword.. Is this possible?

And secondly.. Does the fetch function have an random function, I remember reading about it but I am totally unable to find it.

Cheers
Tore

Gabriel Ambuehl

Wednesday 12 January 2005 12:02:18 am

Two ways: either use content,search instead of content,fetch or use object relations to assemble the keywords (this can potentially lead to a lot of objects you link to, though), the second way is what I did on a page to easily have topic maps.

Visit http://triligon.org

Tore Skobba

Wednesday 12 January 2005 12:05:17 pm

Are you sure this would work for my solution, basically I need this kind of algorithm.

{section loop=$node.keywords}
   Keyword{$item.name}
   {section loop=fetch(all images having keyword $item.name}
      {display iamge}
   {section}
{/section}

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

Main resources:

Total runtime0.0189 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0080 590.4063152.6406
Module start 'layout' 0.00800.0040 743.046939.4766
Module start 'content' 0.01200.0047 782.523489.3828
Module end 'content' 0.01670.0022 871.906330.3047
Script end 0.0189  902.2109 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.003116.2738140.0002
Check MTime0.00157.9712140.0001
Mysql Total
Database connection0.00157.856510.0015
Mysqli_queries0.004423.133330.0015
Looping result0.00000.095810.0000
Template Total0.00178.910.0017
Template load0.00094.927110.0009
Template processing0.00073.938910.0007
Override
Cache load0.00073.679310.0007
General
dbfile0.00021.285780.0000
String conversion0.00010.364340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs