Multiple styles in one view in Drupal

I create a search function in Drupal by exposing filters in a view. The problem is that I would also like to add a Google map showing the location of the nodes, in addition to the search results (node ​​title and some other fields). I can easily do one or the other, but it’s hard for me to display the search results in a standard way and the map below it. The reason for this is that I can’t select mmultiple styles in the views - that is, the Gmap and HTML list. Any ideas how I can achieve this? Perhaps this is possible by showing 2 separate views on the same page, but how do I pass the parameters? Any help would be appreciated.

+5
source share
2 answers

This is an interesting question. This is definitely doable.

The solution is to create a Display Attachment Display for the gmap style (just like Page Displays and Block Displays have Attachments). First google around and understand the concept of embedding views and learn how to create a simple one.

When you create a view attachment screen, you need to specify which display will “attach” your view. Subsequently, in the attachment settings, make sure that you set "Inherit Exposed Filters" to "yes."

The following are the steps in sequential order.

  • Create the View Search Results page (Node title + other fields)
  • Create the set filters on the display by default (so that they are available for all types of displays)
  • gmap. , , .
  • , , 2.
  • , " " - "" .
  • Profit!
+6

, Gmap . , .

0

All Articles