Using drop-down boxes to select content

Author Message

joe hobbs

Tuesday 14 June 2005 9:06:37 am

Hello EZ people.
Have you got your thinking hats on?
I am using a drop-down box to allow a location to be selected. The resulting page should show a list of hotels in the selected location.
My problem is that I am uncertain how the variable selected in the drop down box is used to determine the correct page for viewing?
Any suggestions most welcome.
Many thanks in advance

Gabriel Ambuehl

Tuesday 14 June 2005 11:45:38 am

Use it as parametere to a search query?

Visit http://triligon.org

joe hobbs

Wednesday 15 June 2005 1:56:48 am

Hi Gabriel
I have a folder containing 'hotel' class objects. (my hotel class has a few text and image attributes). The drop-down box displays different locations. I would like to use the choice from the drop-down box to determine which 'hotel' objects are fetched for display.

Tom Couwberghs

Wednesday 15 June 2005 2:27:07 pm

Hello Joe,

it seems like the best thing you can do, is use a combination of attribute filtering and view parameters.

For e.g. when you have /(location)/xxx in your view parameters, you can use the attribute filter in the fetch function to fetch only hotels in that location.

Please view the documentation for instructions on how to do this.

--
Tom

joe hobbs

Wednesday 22 June 2005 1:30:08 am

Tom
Thank you for your good suggestion which put me on the right path. I include the code which did the job.

{let
countyvar=ezhttp( 'county', 'get' )
testimonials=fetch('content',list,hash(parent_node_id,123, attribute_filter, array( array( 'partner/location_county', '=', $countyvar ) ) ) ) 
}

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 15:04:30
Script start
Timing: Jan 18 2025 15:04:30
Module start 'layout'
Timing: Jan 18 2025 15:04:30
Module start 'content'
Timing: Jan 18 2025 15:04:31
Module end 'content'
Timing: Jan 18 2025 15:04:31
Script end

Main resources:

Total runtime1.3139 sec
Peak memory usage4,096.0000 KB
Database Queries65

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 589.1484152.6406
Module start 'layout' 0.00520.0028 741.789139.4766
Module start 'content' 0.00801.3042 781.2656588.3047
Module end 'content' 1.31220.0017 1,369.570312.1406
Script end 1.3139  1,381.7109 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.2426160.0002
Check MTime0.00130.0956160.0001
Mysql Total
Database connection0.00070.054110.0007
Mysqli_queries1.266796.4092650.0195
Looping result0.00060.0473630.0000
Template Total1.280697.520.6403
Template load0.00200.154820.0010
Template processing1.278597.306020.6393
Template load and register function0.00020.016410.0002
states
state_id_array0.00170.130010.0017
state_identifier_array0.00280.214220.0014
Override
Cache load0.00170.1290260.0001
Sytem overhead
Fetch class attribute can translate value0.00070.052730.0002
Fetch class attribute name0.00090.066260.0001
XML
Image XML parsing0.00190.141030.0006
class_abstraction
Instantiating content class attribute0.00000.000860.0000
General
dbfile0.00190.1451160.0001
String conversion0.00000.000640.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
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/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: 19
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs