6

So, I have a View which uses exposed filters which has the exposed form style set to block.

In my first view display, I have one page display which shows the content as teaser view for all results. The teaser of the content type is styled with a custom template (node--my-custom-type.tpl.php).

I then made 3 tabs using the "Quicktabs" module and put my view page as one of the tabs, and 2 generic PHP blocks as placeholders for the other 2 tabs.

I setup a Page in "Panels" (Page Admin) so that I can have the block above and the quicktabs content below. I might change the layout later on but for now it works fine.

My 3 tabs are therefore:

  • List
    • This the View Page (Teaser view of the content type)
  • Map
    • Currently a block placeholder but should be linked to the same View Page results
  • Other
    • Currently a block placeholder but should be linked to the same View Page results

Now, I want to know how can I set the Map and Other tabs to be different View displays for my View that are linked to the same exposed form in my first views display?

Furthermore, the Map and Other tabs would need to just get the custom field: field_id and append the values of all the results to an iFRAME - so I really just need to output PHP and nothing else, no fields or anything.

I suppose I could do this via another custom themed display for the content type... e.g. adding another teaser display type named custom-teaser?

However, how would I "link" all the results between the displays using the same exposed filter block?

UPDATE 17/2/13:

So I tried the "Attachment" display, however that just added the field_id to my "List" tab and I don't want the field to appear on that tab.

UPDATE 4/6/13:

I haven't looked into fixing this issue for a while, but getting back to it now.

So I want the end result to be:

  • A page with exposed filter and 3 tabs that show each different "view display"
    • Tab 1: Show results as Gallery (custom CSS styling)
    • Tab 2: Show results on a Map (results have IDs, would need to get the IDs and pass them to the Map as an array or string as a comma separated list)
    • Tab 3: Show results on another map using different fields

The results should all correspond to the same exposed filter and should be updated when you update the filter. I currently use Quick-Tabs but I can change to something else to make the tab effect.

1

You can use only one exposed form of one of the displays. The other exposed forms should be set "as block", so they are not shown (as you will not set them active in the block configuration). As exposed forms work via GET-params, you simply can use the same "Filter identifier" for filters that shall share the same value.

An exposed filter in display2 with identifier type will use the same value as the exposed filter in display1 with the same identifier type.

Exposed filter identifier

This way you can control all three displays by only using one exposed form.

0

I think the best options for you is to load the first view in a normal way with the exposed filter, and load your other views programmatically with the correct arguments that you can get from the url.

Get parameter from URL:

$count = $_GET['count']

Print view with args :

print views_embed_view('search', 'page_1', array(23,44,100));

  • I'm not too sure what you mean, however I know that my main "gallery" view is set to one specific display, so I could make other displays (like teaser, or some custom ones) then in the views tpl file, I can check if($display == $teaser) than set output =+ the_id . ","; - Then this way might work, I would just restyle the other two views to have the results add to the URL of the iFrame for each other display – dan2k3k4 May 31 '13 at 7:19
  • I'm using AJAX, I think I'll need to remove the quick-tabs and do the tabbing myself with CSS? – dan2k3k4 Jun 4 '13 at 10:23

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.