This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » Developer » Using drop-down boxes to select content

Using drop-down boxes to select content

Using drop-down boxes to select content

Tuesday 14 June 2005 6:06:37 pm - 4 replies

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

Tuesday 14 June 2005 8:45:38 pm

Use it as parametere to a search query?

Wednesday 15 June 2005 10: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.

Wednesday 15 June 2005 11: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.


Wednesday 22 June 2005 10:30:08 am

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

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

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from