This project is read-only.

How to have dynamic Queries??

Topics: Administration, General
Jan 11, 2013 at 4:22 AM

Hi Guys,

I am new to Orchard and checking the Orchard feasibility for a project. 

I have a set of sub menus, which shows country names. When one of these is clicked, a page is displayed, which has a widget to show images related to that country.

For this, I have used the Queries from the, administration, But for this I had to use number of queries which is equal to number of countries that I have in my menu.  

I am thinking about a dynamic query, where I can pass the country name from the menu as a parameter to the Query. Because it seems queries are static in design time.

Is this POSSIBLE? Or Is there any other easy way rather than queries??


Jan 11, 2013 at 5:08 PM

You can use a query filter. Assuming the country name is implemented on the pages as a field, you can add a field filter, and base the value on a query string token.

Aug 1, 2014 at 4:01 AM
Could you give an example or related links?
I have the same question on this. I can create a query, but seems the filter only can be assigned with a fixed filter value. I don't know where to configure it can be accept a parameter dynamic from URL?