0

For example, I have a Page view which displays Content Type A Title, Post date and categories. This page will lists out all of the matching contents that this user has published.

Then I created a Block view that displays contents from Content Type B with Title and categories. The similarity between content type A and B is the categories. I want to display the contents of the block under each result in the Page that matches each category chosen for that node.

How would you display this in the view? I have heard of Views Attach or Entity Views Attachment . But the first one is only for D6 while second will probably not work since I'm not using entities ... or am I?

Or can this be done using Panels? How to do this dynamically with the Block view auto populating the Page view with the right amount of results?

I want to be able to display multiple views results for multiple taxonomies in one page. The content types do not have references for each other. But they do share the same taxonomy vocabulary and its terms.

Edit: This is how I want to display the entire page

Page Results Name 

Page Result 1: Title    Date Posted     Categories
    Block Result 1 Title     Matching Categories

Page Result 2: Title    Date Posted     Categories
    Block Result 2 Title     Matching Categories

Page Result 3: Title    Date Posted     Categories
    Block Result 3 Title     Matching Categories

...

The Page is populated by Content Type A The Block is populated by Content Type B

Want Each Block to have 10+ results that matches categories on Content Type A

It's not just placing Block view underneath the Page view. They're embedded together.

Right now, I have the 2 views displaying the correct results separately. But having trouble integrating them together.

Oh and the results for Content Type A should only display contents that the logged in user published. But the Content Type B can be from any author as long as it matches the Categories.

  • 1
    Hello and welcome. "The best" encourages opinion-based answers, and that's what we want to avoid here. Consider either defining what qualities you want, or simply asking how to do it, and seeing what people answer. – Mołot Aug 12 '14 at 7:11
1

You can use a combination of Taxonomy, Views & Panels.

  1. Add the same taxonomy vocabularies to both the Content types A & B
  2. Create a view for Content type A with Contextual filter for Term-ID
  3. Repeat the same for Content type B
  4. Override the Panels page for Taxonomy & create the variant for your vocabulary
  5. Add the above 2 views on the created Panels variant & also pass the argument term id to the view.

Well, you will have to dig into the Panels to get your requirement implemented.

  • Will try this suggestion. Panels is too complicated to understand, but I think it might be the only way to get this showing correctly. Will probably ask more questions later. – Frances Naty Go Aug 13 '14 at 0:19
  • Well, Panels are fun once you get hold of them. I have given you another approach as well. Anyways, check this video tutorial by Shane Thomas (You should check his videos. Those have helped me over time, here & there). youtube.com/watch?v=_VIkE2ZS5oU This video demonstrates the overiding of a Node (content type page). You, in your case will have to use "Term-Page" in Panels. Its tricky, but not tough. Best of luck. – amohite88 Aug 14 '14 at 13:11
  • Thanks amohite88. Will check out that video tutorial. Appreciate it. – Frances Naty Go Aug 22 '14 at 4:08
  • I semi got this working from your Panels suggestion by adding the Block view results in the Panels content Type A page display. Problem is that some results for Content Type B is getting displayed multiple times because the taxonomies exist more than once for each result. Is there a way to only display one of each result for Content Type B? ... if you're wondering the long break from previous question is because waiting for design. – Frances Naty Go Sep 27 '14 at 8:07
  • Restricting item of a view output...?? You can always restrict that using the no. of items to display under the PAGER settings. – amohite88 Sep 29 '14 at 9:25
2

If You are not comfortable with Panels, then

  1. Create one of the required views, a view page (for Content-type A) with proper contextual filters.
  2. Create the other view (Content-type B) as an attachment (attachment Views).
    • Select INHERIT contextual filters while creating it.
    • Basically, both the views should have the same contextual filters.
  3. Attach it to the first view created for Content-type A.

This might be an alternate solution.

For overriding the default taxonomy term paths check this tutorial - Overriding the default taxonomy page with a view in Drupal 7

  • Hope you are able to manipulate the contextual filters properly in the views.
0

assuming you have the contextual filter set correctly and both views show the correct data, you can do this without using any additional modules - include the block view as a footer to the first view - or under admin/structure/blocks you can assign the block view to only appear in the content area on the page address for the first view.

  • It's not that simple. I want the block display to embed for each result in the Page View. – Frances Naty Go Aug 12 '14 at 19:25
  • Oh I see, that wasn't clear in the original question – Geoff Aug 12 '14 at 20:21

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.