Forums / Developer / Using drop-down boxes to select content

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 ) ) ) ) 
}