2

I have a view in Drupal 8 that looks as follows (see screenshot). To make the long story short, I need to make this view output a fixed HTML block (piece of code, not Drupal Block) and not pull any dynamic data from the respective content type.

What is the most efficient way of doing this?

enter image description here

3

In your screen shot, there is HEADER and FOOTER section. Click add in one of them and add a Global: Text Area, and put your HTML there, for text filter use FULL HTML.

enter image description here

  • Why make it difficult if you can K.I.S.S., right? – Pierre.Vriens Apr 22 '17 at 6:57
1

Output the block to the page. View the HTML source for the page. Copy the HTML for the block.

If you want to display the block on the site, then create a new block through the admin interface, and paste the HTML there.

  • I already have the HTML that I would like the view to display. Could you give a more step-by-step instructions on how this can be achieved? – MadPhysicist Apr 20 '17 at 17:12
0

If it helps anyone, what i ended up doing was creating a new custom Block in Drupal and pasting the needed HTML there as Full HTML format. I then placed this new Block in place of the View in question on the needed page. I did the latter on the Block Layout page.

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.