3

I have a view with two displays: page and attachment. The exposed filters are the same for both the displays, and I used the Inherit exposed filters in the attachment settings.

I want to put the attachment in a specific theme region. How can I print the attachment in a different region?

enter image description here

The "pink" box is the attachment, which contains a Leaflet map. The user can select either one of the filters and see the results in the box map and the page below (node1, node2, node3, ...).

This is a screenshot of the view page as it is now.

This is what i have now

Either of these solutions could work for me:

  • Be able to display the attachment display in another region, then the page display under it
  • Have a block that functions in the same way as an attachment and inherits all exposed and contextual filters in the way an attachment would do

I tried to use views_embed_view() in a custom PHP block. The block shows correctly the attachment, but the filter doesn't work with the new block.

$view_name = 'indoor';
$display_id = 'attachment_1';
print views_embed_view($view_name, $display_id);

I think the problem is the AJAX parameter view_dom_id passed to the block.

This is what i want:

enter image description here

0

1 Answer 1

1

At moment I fixed with contextual filter query by disabling the ajax and get query from URL. This way I can use separated block for the map.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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