Build selection fetch/list and sort

Author Message

Tim Dickinson

Friday 15 December 2006 6:50:46 pm

Hi all,

I have created a class which contains a number of selection datatypes.
What I would like to be able to do is to create a form with pulldown lists for users to limit their fetch by choosing what they want from those selection datatypes.

To try to explain it a bit better, the content class look like the following

-title
-body
-selection_a
-----option_a_1
-----option_a_2
-----option_a_3
-selection_b
-----option_b_1
-----option_b_2
-----option_b_1
-selection_c
-----option_c_1
-----option_c_2
-----option_c_3
-rating
-url

I would like the user to be able to choose each option for each datatype through a series of pulldown menus, and then when the form is submitted to produce a list of results that have each of those options. I would then like to sort the list by rating (descending)

I know this has something to do with fetch and sort, but I am at a complete loss as to how to create the pulldown lists.

Thanks in advanace,

Tim

http://www.AdBalance.com - Ad network news and reviews
http://www.DevPublisher.com - Website publisher guides, tools and news
http://www.AudioMelody.com - Make better music

Marko Žmak

Monday 18 December 2006 7:59:53 am

You should use attribute filter and sorting by attribute. Check the examples on the bottom of this page:

http://ez.no/doc/ez_publish/technical_manual/3_8/reference/modules/content/fetch_functions/list

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

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

Main resources:

Total runtime0.0278 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.0150 588.0313152.6406
Module start 'layout' 0.01500.0039 740.671939.4609
Module start 'content' 0.01890.0066 780.132889.3203
Module end 'content' 0.02560.0022 869.453130.3047
Script end 0.0278  899.7578 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.003111.1698140.0002
Check MTime0.00145.0673140.0001
Mysql Total
Database connection0.00165.855710.0016
Mysqli_queries0.004215.021030.0014
Looping result0.00000.078810.0000
Template Total0.00186.510.0018
Template load0.00103.590710.0010
Template processing0.00082.893110.0008
Override
Cache load0.00072.594910.0007
General
dbfile0.00155.283280.0002
String conversion0.00000.036040.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