0

I have a design requirement or ask that wants to have a search form at the top of a Views page look like the attached image.

enter image description here

So there is an exposed full text input, exposed sort by filters.

However, the result summary for the view would appear to need to go in the middle of the form.

Since this is on a View page, is there a way to get the current View and fetch its result summary within a hook_form_alter()?

3
  • While slightly off-tangent, could drupal.org/node/2761273 point you in the right direction?
    – zerolab
    Feb 3 '17 at 16:15
  • That looks interesting - is that 8.4.x only? I am on 8.2.6.
    – Kevin
    Feb 3 '17 at 17:24
  • The issue is for Drupal 8.4.x just because those changes are applied first to the branch that is the development snapshot, and then to the other ones.
    – apaderno
    Feb 3 '17 at 17:27
-1

However, the result summary for the view would appear to need to go in the middle of the form.

Since this is on a View page, is there a way to get the current View and fetch its result summary within a hook_form_alter()?

Don't complicate your Drupal life, and just KISS.

I assume you already added the Result Summary to your View's header. So just:

style.css

.view-id-[your-id] .view-header {

  position: absolute;
  top: 70px;

}
0

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.