2

Let's say I have Content Type A and Content Type B. Both A and B share a taxonomy vocabulary C. C terms are C:x, C:y, C:z

I want to create a page View of Content Type A which lists every node of Content Type A. Within the physical layout of each A, I want to also show B, but only if it share's C with A.

The page generated by the View should look like something like this

1st CONTENT TYPE A with taxonomy C:x
=====================
Content Type A field 1
Content Type A field 2
Content Type A field 3
Content Type B with taxonomy C:x
=====================

2nd CONTENT TYPE A with Taxonomy C:y
=====================
Content Type A field 1
Content Type A field 2
Content Type A field 3
Content Type B with taxonomy C:y
=====================

I have everything working except for the Conent Type B with taxonomy C:foo working. What do I need to do to get this part working?

3
  • 1
    With JoeS suggestion, I figured out how to use Node Reference (or at least enough to get it working for my need). This approach isn't exactly what I wanted but it will do for now. I really wanted to manage the content types separately and link together by the system through taxonomy, as the question describes. – Ben Dec 16 '11 at 15:44
  • There may be another possibility Views Field View allows the user to embed on view in the filed of another. There is no documentation available on it, but you might want to load it and place a view in a field to see how it is displayed. Who knows, it might work! – Ashlar Dec 17 '11 at 0:33
  • I tried View Field View a few days ago and it didn't work. It gave my site a white screen. I'm thinking there's a way to do it with the View Relations, but I can't figure it out. :( – Ben Dec 20 '11 at 22:00
2

Check out the module Relations. It will enable you to make relationships between the two content types. You can see it in action at nodeone.se in the video series on Relations.

6
  • Are you referring to Views Relations or the Relation module? I checked out both. The Relation module seems overkill for doing such a small thing. I couldn't convert what I learned in the Views Relations video to what I'm trying to do. Any chance someone can tell me what to click? I'm not trying to be lazy or sassy. I just really have a mental gap somewhere and I can't make sense of it. But actually seeing it work for my hotel site should solidify what's going on in my mind. – Ben Dec 15 '11 at 21:40
  • I installed and tried out the Relation module. It was buggy, and would go to a white screen when I tried to create a relation. – Ben Dec 16 '11 at 13:39
  • Sorry to hear that. I'm using v7.x-1.0-beta, although not to heavily, without problems. The only alternative I see is to create custom fields in both content types to hold their relationship and define the relationship for each content as it is created. – Ashlar Dec 16 '11 at 14:09
  • "...create custom fields in both content types to hold their relationship and define the relationship for each content as it is created." I thought I was doing that with the taxonomy terms. What I can't figure out is how to get the amenities to show only with the room types that share the same taxonomy term. – Ben Dec 16 '11 at 14:18
  • Have you tried adding a Node Reference field? (I feel like I'm missing something in your question) – Ashlar Dec 16 '11 at 14: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.