Views argument builder
Hi, My first post to the mailing list here. I'm thinking about starting development on a module that can create forms that in turn create a URL to feed to an existing View. A good example would be a classifieds ad setup where the Content Type is Advertisement with various fields, and the View is Search_Results, referencing those fields as needed. This module would allow an admin to create a form in which he could specify values (via checkboxes or dropdown) that, upon completion by a user, are handled in Views argument handler. So, for example, a Price field, would take the arguments max_price and min_price to return ads in a users price range. As I mentioned, I'm new, so any advice or alternate suggetions are very welcome. Mostly, I want to know if this is something people want? Thanks in advance. --Tresler
Hello, I've been thinking about something like this for a while since drupal search doesn't fit my needs. I thought I could have a basic view and use a form to tweak it a little, change the sorting, price range, etc. I'll keep an eye on your development.
Mostly, I want to know if this is something people want? Thanks in advance.
--Tresler
Michelangelo Partipilo wrote:
Hello,
I've been thinking about something like this for a while since drupal search doesn't fit my needs.
I thought I could have a basic view and use a form to tweak it a little, change the sorting, price range, etc.
I'll keep an eye on your development.
Mostly, I want to know if this is something people want? Thanks in advance.
--Tresler
I've been exploring my ideas about this and need to next plot it all out as the idea has grown some. Basically, you can create views through calling views_build_view() I *think* what I want to do is create a module that can, at one page create a Content type via CCK, a View for it via the views.module, and the "search" form that can pass filters to the View. The benefits of this would be a centralized interface that can do a common set of tasks at one place, BUT using the seperate modules, so you could later use the view, content type, and custom form elsewhere. The use I have in mind is for easy classifieds with multiple search criteria per form. E.G. Price Field from CCK can be searched through Views and its filters by a min_price and a max_price. The filters are passed to teh View upon form submission, not set in the View itself. Later the same CCK and View can be used to generate a block regardless of the search form. I think there is a strong benefit of centralizing these components, while keeping htem seperately tweak-able.. Input? --Tresler
participants (2)
-
Michelangelo Partipilo -
Sam Tresler