Node Location Relationship
Last modified: May 20, 2009 - 20:38
To demonstrate the usage of the Node Location Relationship module follow these steps:
NOTE: experienced users need only follow the numbered steps.
1) create a Venue content type with a location
- Set the name to "Conference" and the type to "venue".
- Scroll to the heading "Locative information" (if necessary click this heading to expand it)
- Under the heading "Number of locations" (if necessary click this heading to expand it) change "Minimum number of locations" to 1, "Maximum number of locations" to 1 and "Number of locations that can be added at once" to 1.
- Click "Save"
2) create a Conference content type with a nodereference that refers to Venue nodes
- Set the name to "Conference" and the type to "venue".
- Click "Save"
you will now be at the "Content types" page listing all available content types
- Find the row for "Conference" and click on the "manage fields" link
- Add a new field with the label "Venue", the name "venue", the type "Node reference" and make it a "Select list" widget.
you will now be at the "Venue" field configuration page
- Under the heading "Content types that can be referenced" check the option "Venue"
- Click "Save field setting"
3) create sample content with types Conference and Venue. Be sure to fill out the location on each Venue you create.
4) create a new view using the "Node Location: Reference" relationship
- Set the "View name" to "conference_by_venue"
- Set the "View type" to "Node"
- Click "Next"
you will now be at the edit view page
- Add a relationship
- In the heading for the "Relationships" box click the "+" icon
- Check the "Node Location: Reference" option
- Click "Add"
- Check the "Require this relationship" option
- Set "Node reference field" to "Venue (field_venue); appears in Conference"
- Click "Update"
- In the heading for the "Relationships" box click the "+" icon
- Add node title and location address fields
- In the heading for the "Fields" box click the "+" icon
- Check the "Node: Title" option
- Check the "Location: Address" option
- Click "Add"
you should now see the "Defaults: Configure field Location: Address" form
- Set "Relationship" to "Referenced lid"
- Click "Update"
you should now see the "Defaults: Configure field Node: Title" form
- Click "Update"
- In the heading for the "Fields" box click the "+" icon
The preview should now update and show a list of addresses and titles
