Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
viewsreference
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
viewsreference
Merge requests
!37
Bring back behavior with no results and exposed widgets
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Bring back behavior with no results and exposed widgets
issue/viewsreference-3399878:3399878-view-not-shown
into
8.x-2.x
Overview
0
Commits
2
Pipelines
2
Changes
1
Merged
Christopher Lewis
requested to merge
issue/viewsreference-3399878:3399878-view-not-shown
into
8.x-2.x
1 year ago
Overview
0
Commits
2
Pipelines
2
Changes
1
Expand
Closes
#3399878
0
0
Merge request reports
Compare
8.x-2.x
version 2
e0f93a04
1 year ago
version 1
ccaf270b
1 year ago
8.x-2.x (base)
and
latest version
latest version
94cb6e63
2 commits,
11 months ago
version 2
e0f93a04
2 commits,
1 year ago
version 1
ccaf270b
1 commit,
1 year ago
1 file
+
3
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
src/Plugin/Field/FieldFormatter/ViewsReferenceFieldFormatter.php
+
3
−
1
Options
@@ -115,7 +115,9 @@ class ViewsReferenceFieldFormatter extends FormatterBase {
$render_array
=
$view
->
buildRenderable
(
$display_id
,
$view
->
args
,
FALSE
);
if
(
!
empty
(
array_filter
(
$this
->
getSetting
(
'plugin_types'
))))
{
if
(
!
empty
(
$view
->
result
)
||
!
empty
(
$view
->
empty
)
||
(
$exposed_form_handler
?->
options
[
'input_required'
]
??
FALSE
))
{
// Show view if there are results, empty behaviour defined, exposed
// widgets, or a header or footer set to appear despite no results.
if
(
!
empty
(
$view
->
result
)
||
!
empty
(
$view
->
empty
)
||
(
$exposed_form_handler
?->
options
[
'input_required'
]
??
FALSE
)
||
!
empty
(
$view
->
exposed_widgets
)
||
!
empty
(
$view
->
header
)
||
!
empty
(
$view
->
footer
))
{
// Add a custom template if the title is available.
$title
=
$view
->
getTitle
();
if
(
!
empty
(
$title
))
{
Loading