2

I want to add an additional subtitle to a block view in Drupal 8. For example my View would be showing News on the site. So I want the title to be 'News' and then a subtitle underneath 'My Subtitle'. Then the list of news would follow. How would I do this? Can i add additional fields just like with custom blocks?

In the end it should look something like that:

    <div class="content-section-heading">
       <h2 class="content-section-subtitle"> Subheadline </h2>
       <h1 class="content-section-title"> Headline </h1>
    </div>
   <div>
      Block Content
   </div>
  • I added some HTML Code to illustrate the end result. – Benedikt Sep 12 '16 at 13:01
3

The easiest solution is to add a Global: Text area in the HEADER and type your Subtitle there.

enter image description here

You can use FULL HTML and wrap it in a div class or ID so you can do some CSS work on it.

Can i add additional fields just like with custom blocks?

You can add fields to your view

enter image description here

or attach another view that contains fields in the FOOTER, but fields in views and fields in custom blocks are totally different.

  • Is it possible to have the subtitle field globaly for all blocks and views? And set a value for each block in a form. Just like with the title field? – Benedikt Sep 12 '16 at 12:48
  • @Benedikt not out of the box. You would have to build a custom module to add this feature. – No Sssweat Sep 12 '16 at 18:31
  • There is no module built for this already I guess? – Benedikt Sep 13 '16 at 6:42
  • @Benedikt not for D8. – No Sssweat Sep 13 '16 at 8:16

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.