0

I am building a Church Management System, I am working on the members database at the moment. I have 2 contact types, Individual & Household.

The individual has fields for personal details & contact details one of which is a field for selecting which Household they belong to. The Household has fields for the address of the household & contact details for the household.

When viewing the content for an Individual, I want to be able to click the listed Household which takes me to a page that shows me the details of the Household. e.g. Location, Contact Details & a list of the members of the household.

Is there a way to just put this into the Household Content type as a field, or how do I do this in Views?

I can set up the View to display the general details, but I cannot work out how to have it to show only the clicked household from the individual page and the individuals associated with the Household.

Thanks in advance.


Im still a bit confused I attempted pizzasynthesis suggestion and couldnt get it to work, and I have changed my thinking a bit. I am including screenshots of my config if anyone can give me ideas and/or suggestions on what to do would be awesome.

I am now thinking of using a block view that is only shown in the Household content type page and lists the Individuals of that Household(not sure it is possible to do but please tell me how best to do it).

Individual Content Type: Individual Content Type

Test Member Edit Contact Details: Test Member Edit Contact Details

Household Content Type: Household Content Type

Household Edit Details: Household Edit Details

Household Members View Block: Household Members View Block

Individual: Individual

Household: Household

I only want to be able to see the Individuals listed for that specific Household.

Any help would be greatly appreciated.


OK Heres where I am at now.

Block View: enter image description here

Household: enter image description here

Ive done what pizzasynthesis said and this is what Ive got.

1
  • Anyone able to shed some light on this for me? – David Aug 12 '14 at 4:23
1

When you want to create relationships between various Content Types, the first solution many go to is Entity reference.

Provides a field type that can reference arbitrary entities:

It creates a new field type available on all entities that can reference entities of other types. You can specify, with granularity, what types of bundles to reference (in this case you'd want to select the bundle 'Node').

Once you've created this field, you can now reference the Household directly through the node edit form. From that point forward, in Views, you can create a Relationship to the Content being referenced through the entity reference field (search entity after Adding a new relationship to find this), and then you can render any type of attached Content you wish (the Title as a link to the Node, via field settings; the entire rendered Node, etc.) through either Fields (in Views) or using Display Suite.

3
  • Thanks for that, I am still a bit confused. I added more info above about what I am trying to accomplish. – David Aug 9 '14 at 8:54
  • Okay, since the question has changed a little bit, here's what I think you should do: On the Block View Inteface add a new Relationship to Content: Household -- which should say something like: Relate each Content referencing the node through field_chms_indiv_household. Once you've attached this relationship, you'll see an 'identifier' field. This will enable you to use that Relationship on the 'Fields' part of the interface. Remove the Content: Household field completely. Now give the Content: Title field a the Relationship to the Node reference. – bazeblackwood Aug 9 '14 at 16:13
  • Thanks Ive done what you said (I think). Now I get 3 Labels with no content next to them. (Ive added more screenshots above) – David Aug 10 '14 at 3:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.