0

This is my problem of the day. I would like to display the Items per page at the top of the content block.

I'm working on a View Block, this is an Exposed Filter with "Better Exposed Filter". For now, I'm doing this the dirty way with jQuery and a unstable DOMSubtreeModified bind. I have a twig with {{ exposed }}, but Drupal doesn't suggest me any deeper twig and if I had one, it wouldn't access the Content div I guess. So I have no idea about how to do this.

Here is the div organisation :

  • div.exposed-block
    • form.views-exposed-form
      • Filter-1
      • Filter-2
      • Items-per-page (select)
  • div.view-block (with my content)

So, the idea is to move Items-per-page to div.view-block. Or into another that I can create, here is the twig part :

<div class="exposed-block">
    {{ exposed }}
</div>

<div class="bmcp-view-block">
    {{ rows }}
</div>

How would you do this ?

Thanks in advance.

0

This is the answer I got from a forum.

<div class="exposed-block">
    {{ exposed | without ('items_per_page') }}
</div>

<div class="view-block">
    {{ exposed | without('my_first_other_filter', 'my_second_other_filter') }}
    {{ rows }}
</div>

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.