Question

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?

Was it helpful?

Solution

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.

OTHER TIPS

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.

You can create views as pages or blocks. As you're not telling exactly which Drupal/Views version you're working with, all I can tell so far is that, after you create the view, you can tell it to display as a block or as a page.

Then go to the blocks settings and set that to the position you want.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top