Hi:
Again I love the Contact List module but have a second feature request for Contact List and that is to have the option to have a "meta" category tied to a content type.
For example, imagine you have a Drupal website for a city government where people might need to contact any of the following:
- Police Department
- Fire Department
- Water Department
- Parks & Recreation
- Corrections
- Planning & Development
- Mayor's Office
The contact list module currently handles this very well. However,...
In my example you have sixteen (16) city councilman/councilwomen that need to allow people to contect them in addition to the above list of departments. And to model these council people with Drupal you might create a content type called "councilperson." On it you might have a contact email address but you don't display that email address on the councilperson's web page to avoid spam. To add each councilperson to the contact list we could modify the Contact List module to provide an option to specify a content type and one of its fields where the email address is stored to be used as a source for contact list categories. That would give us a list like this (ignoring the bullets and numbering, used here to delineate the differences between the two lists):
- Police Department
- Fire Department
- Water Department
- Parks & Recreation
- Corrections
- Planning & Development
- Mayor's Office
- Anne Fauver
- C.T. Martin
- Carla Smith
- Ceasar C. Mitchell
- Clair Muller
- Cleta Winslow
- Felicia A. Moore
- H. Lamar Willis
- Howard Shook
- Ivory Lee Young Jr
- Jim Maddox
- Joyce Sheperd
- Kwanza Hall
- Lisa Borders
- Mary Norwood
- Natalyn Mosby Archibong
(Yes, I stole the list of names from Atlanta.gov.)
I'm adding this as a feature request not to ask you to do it but because I might be making this change for my use and I'd like to know if you'd accept my updates as a new version?
-Mike
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | contact_forms_0.tgz | 2.19 KB | behindthepage |
| #2 | contact_forms.tgz | 1.65 KB | behindthepage |
Comments
Comment #1
behindthepage commentedIf I understand correctly your enquiry is all about displaying a page with a list of the departments and then a list of people underneath.
This is how I do that. I enter all those departments and people into the contact category system so they each have a form and then create a page (with a path like 'directory' or 'contacts') and set out the page exactly as I want or in this case as you have specified. Making the links go to 'contact/category'. This can be done with php like this
(more info http://api.drupal.org/api/function/l/5 )
Then if you then want to redirect to the 'Directory' page change line 39
I have never been completely happy with the contact/list page that my module generates and I have been thinking of putting a user defined path that it falls back to if there is no contact form available then people could design their 'Directory' page exactly how they want it. What do you think?
Regards
gpdinoz
Comment #2
behindthepage commentedHere is a new version of my module that doesn't have a contact/list page but it does have an option to redirect to a user defined page instead of the contact path. I have also tried your clean urls idea with a user defined slug. I ran into problems with all lower case because I use arg(1) to match against the category in the database and it is easy to change the slug back to spaces but how do we know which characters were upper case. You might have a clever idea on how to do this.
In this version I don't hijack the 'contact' path but create a path for each contact form in hook_menu. I have had a few requests for the the standard contact page to be the default page.
Regards
Geoff
Comment #3
behindthepage commentedPS if you are having problems opening tgz in windows get Tugzip at http://www.tugzip.com/
Comment #4
mikeschinkel commentedI was actually using that as a hypothetical example. Maybe I should have used my real example.
I am currently using Drupal to create a generic infrastructure to create websites for homebuilders. Each homebuilder will have one or more subdivisions. For each subdivision there will be a different sales office. Subdivisions are modeled as a content type and we call the content type a "community." What I want to be able to do is have the information for a community maintained in the content for each community but have that automatically show up as a list of contacts within a community. What I don't want to have to do is seperately maintain the contact information in both the community content type and in the contact category, I want it to pull from my "community" content type.
I don't follow the use case for "if there is no contact form available." Available for what or when?
Cool. Give me a few days to get to this. My client is breathing down my neck looking for some visible results so I need to get them some before I work on this part of the project.
BTW, I'll be more than happy to implement whatever changes I'm suggesting and contribute back to Contact_List.
Comment #5
pips1 commentedHi, just to let you know that I'm using your "contact forms", the modified version of your "contact list" module (i.e. I have installed the tarball from post #2). It works well for me. Do you plan to keep both versions available in parallel, or will you merge the functionality as configurable options? Many thanks for this useful modified version!
Comment #6
behindthepage commentedThis is the latest version.
Comment #7
behindthepage commentedThe new version has been committed with and is now an official release
Comment #8
behindthepage commented