There are some steps to reference a view's block display from a field.They are
Step1: Create a region in your theme.
- Open your theme.info.yml.
- Find the section for "regions:"
- Add a new line: sample: 'Sample Region'
regions: header: 'Header' primary_menu: 'Primary Menu' secondary_menu: 'Secondary Menu' page_top: 'Page Top' page_bottom: 'Page Bottom' breadcrumb: 'Breadcrumb' main_content: 'Main Content' sidebar_first: 'Sidebar First' sidebar_second: 'Sidebar Second' footer_first: 'Footer First' footer_second: 'Footer Second' footer_third: 'Footer Third' sample: 'Sample Region'
Step2: create a view with a block display.
- Go to admin/structure/views/add
- Create your view with a block display.
Step3: Place an instance of the block in the sample region.
- Go to admin/structure/block
- Find the sample region.
- Click “Place block”.
- Find the views block and assign that block in the sample region.
Step4: Create a reference field.
- Go to admin/structure/types/manage/type/fields.
- Click “Add field”.
- In that “Add a new field” dropdown, choose “other” under “reference”.
- Label the field and save.
- Under "Type of item to reference" choose "Block" under "Configuration" and save.
- Configure as desired and then save.
Step5: Add the block to the content.
- Add a new item of the content type from step 4 at /node/add/TYPE.
- We can see our new field in the content.If you set the default in Step 4, the view will automatically be filled in.
It is used to display the views block content between the fields.