Including View blocks into a view page? - drupal

How can I include view blocks into a view page? Let's say I have two view blocks named "promoted_feed" and "sliding_feed" and I want those included in /frontpage view?

From UI: Each views block created are listed under admin->structure->blocks by the block name you assigned it to, when you created the view. To make the views block be rendered into a page (any valid drupal url), go to structure->blocks, find the block, click configure. On the configuration page, scroll all the way down to Visibility settings -> pages -> only the listed pages, list the path(relative, no leading '/') for view page and save.

May be views_field_view is what you need?

Related

How to add view to node (drupal 8)

I have create view with custom type "banner".
And I have node with custom type "product".
The product node have page. /product-1
How to link the banner view to product node?
Login as admin account to Drupal
got to the page
/admin/structure/block
Find your view at bottom (if you create view block)
Click on Configure
See the section Visibility
Select tab Pages
Show for the listed pages option is already selected you can change this as per your needs
Now put your URL into the textarea like
if you want your view should display only on a single page put your full URL in this textarea like
product-1
but if you want your block should display on all page which has URL like product-1, product-2, product-3 and so on you can put your URL with wildcard entry like
product-*
Now your views block should display on all pages starting URL with product- not matter what is after product- your views block will display on all pages
I hope you get some points of action to achieve you needs
Thanks

How to redirect views block to a display page

I want to display a block of my view on the front page.
This block will have exposed filters.
Once the filters are filled in by the user and he/she submits it
I want the user to be redirected to the results page which the results instead of showing them the results on the same page.
How can I get this done ? Do I need to use panels for this? I am not sure.
In fact this is quite simple.
You just have to define your page's exposed filters as an exposed form block in your display's advanced options then put this block where you want on your front page.
You can also get more options for the exposed form with the 'Better Exposed Filters' module
Easy Vishal - use the block's display properties to do this.
To restrict block to home page only use 'display only on the following pages' and add . To do this the other way around and put it on all pages except your view you would fill in 'display on all pages except' and put in your view url (ie view/listing-of-stuff)

Drupal: can I place a views filter (Search items) in a website block?

I'm using Drupal and in the "Filters" list there is also the "Search Term" filter which works great.
I use it to search a specific node in my Views list.
However such field only displays when I'm in the view page, but I would like to display on any page of my website (let's say as a block) (and when I search for something, the view page is loaded with the filtered nodes.
Do you know how could I make it ?
thanks
In your view configuration page there should be a field: Exposed form in block. If this is checked then views will create a block with the filters on it rather than embedding it in the view itself. This block can be placed from the block configuration screen and you can make it show on any pages that you want.
I think the option lived under the Filter section in Views 2, in Views 3 it's in its own place called Exposed Form.

How do you promote blogs to a page other than the home page in drupal?

I really like the promote to home page feature of drupal. But what if I want some content promoted to a page other than the home page. Is that possible?
The "promote to front page" is a helper that puts the page in the /node URL. If your front page is not /node, the "promote to front page" won't really do what you expect.
If you want a list of nodes, then views will do the trick. However, if what you want is to put a node in a page that is another node as if it was a block, then I suggest you look at the "node as block" module.
From the module description:
This module allows those with the appropriate permissions the right to create blocks for each node. By default these blocks display the node title as the block title and the node teaser as the body.
I would suggest using Views for this purpose. For instance, create a taxonomy vocabulary with terms corresponding to the various pages you might want content to be promoted to. Then create or edit that content and tag it accordingly. In Views, use the taxonomy filter to display only the matching content.
As often, there are many ways to do that. The Flag module is a good way to put all kinds of markers on nodes. Another option is the Nodequeue module. This module allows the content creator to group nodes in 'queues' and control the order.

Drupal: How to show specific view in a particular block

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?
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.
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.

Resources