Closed (fixed)
Project:
Content Construction Kit (CCK)
Version:
4.7.x-1.x-dev
Component:
General
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
13 Sep 2006 at 14:55 UTC
Updated:
1 Feb 2007 at 19:00 UTC
Hi all,
I'm using CCK to generate my own custom content types and it's working pretty well. I now want to create a route planner content type. This will allow the user to enter in a departure location and a destination - that's 2 addresses that need to be entered. Rather than just using simple text boxes, I want to integrate it with the location.module fields and the gmap functionality. However while I am able to enable the "locative information" for my route planner content type, it only provides me with one location and map on my "create route plan" form. Is there any way that I could get a set of location entry fields and a map for both addresses?
Cheers,
Stella
Comments
Comment #1
stanbroughl commented+ 1
I want this kind of option as well, but for collecting multiple addresses for a node - but a location cck type option with configurable location levels and the option to have multiple values would be good
Comment #2
karens commentedThis is something that has been requested of the location module, but cannot be done without making some changes in the way that it works. You can get this kind of functionality in cck in a round-about way.
1) Create your parent node (the one that needs multiple location fields). Do *not* location enable it.
2) Create a 'location' cck content type. It doesn't need any fields, it's just a holder for the location fields. Location enable that type.
3) Return to the first node and add a nodereference link for each address you want in the node and link each to a location node (2 links for a from and to address).
4) Use themeing or embedded views on the parent to bring in the related location nodes and display them.
This works fine for displaying info, less well for editing it, but it's a starting point. 'Combo' nodes made up of several different node types could be useful in lots of other contexts, too.
Maybe fago's nodefamily module could be useful here? I have no time to follow up on this myself right now, but it's something to investigate.
Comment #3
stella commentedHi,
KarenS, your suggestion sounds good, but I can't seem to get node references to work. I've created my "location" content type and have enabled "locative information" for it. I then tested that the address fields and map appeared on the "create location" page and it did.
I then created my "route" content type and tried to add a "Destination" field to it. I configured this field as a node reference with "location" as the content type to be referenced. However it still does not appear on my "create route" page. I've tried using both the "Autocomplete Text Field" and "Select List" as the node reference widget types (I have to select one or the other).
I'm using the latest 4.7.0 releases of all the CCK modules and the location.module.
Any ideas on what's going wrong? All help appreciated!
Cheers,
Stella
Comment #4
karens commentedThe location module now supports multiple locations natively, so there is no more need for any workaround.
Comment #5
(not verified) commented