Drupal: How to show specific view in a particular block

19,764

Solution 1

Using Views 2.x for Drupal 6.x it's simple to create a block from a view. Every view has a set of 'default' settings and some number of display settings. A display can be a page, a block, a feed or anything else that creative module authors.

To make a block from your view, you just "Add Display" of type "block", override any settings that you want changed in the block (IE - display less items, just a node title, whatever). You then have a block that you can place like any other Drupal block.

edit: Answer to "Can you limit stories to ones that are tagged"? Sure thing. You just add a filter for Taxonomy terms.

Solution 2

Getting a view to display in a block is easy. Once you have created a view and assigned the view as a block position you simply head to blocks in your admin and you'll see the view.

Just select the block and save it. Simple.

If your view doesn't show, check your filters and that the view fields are correct. Usually if they are not showing it is something simple like selecting content published = yes.

Share:
19,764

Related videos on Youtube

AlexA
Author by

AlexA

Freelance Python developer. Data engineer. LinkedIn Profile: https://www.linkedin.com/in/alexey-a-181a614/ AWS Certified Solutions Architect associate Tools: Django, Python, AWS, Celery, mysql, Postgresql, jquery, Backbone.js

Updated on April 15, 2022

Comments

  • AlexA
    AlexA about 2 years

    Let's suppose I have created a view that shows some kind of stories. But I want to show this view in a left-hand bar — not a link to the view, but the view itself.

    How can I connect my new view with a fixed block position? I want to be able to show real view data in various places on my page. Is it possible or I am limited only to central area and links to views from menu?