Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 28310

The Views module allows creating lists of entities with a flexible query builder.

1 vote

Multiple exposed form blocks with different fields

On my Drupal 9.5x project, the old duplicate page method works. Steps: Create a page display with all the desired fields and the set of exposed filters you want in block1. Duplicate the page display …
aharown07's user avatar
  • 414
1 vote

Is there a way to default sort by date when no search keywords have been used, but default s...

On the views config page the query without keywords looks like this: Index: main_index Keys: NULL Conditions: [ status = 1 AND type IN array ( 'resource' => 'resource', ) … ] Sorting: search_api_relevance DESC, field_display_date DESC Options: array ( 'search_api_view' => 'object (Drupal\\views\\ViewExecutable)', 'search_api_base_path' => 'search/resources', ) …
aharown07's user avatar
  • 414
4 votes
2 answers
778 views

Is there a way to default sort by date when no search keywords have been used, but default s...

When the user goes the "search page" for the content type, they see a views-generated search result page unfiltered by any keywords. In other words, it displays all the items for that content type. … My question is, is there a way to make an unfiltered "search result" views page show the newest content first, while having the default sort actually set to relevance, so nobody has to manually change …
aharown07's user avatar
  • 414
0 votes
0 answers
29 views

Views: count flaggings per entity-referenced node

I have a flag called Collect. (Flag is individual, and enabled on multiple content types.) The flag has an entity reference field to a content type called Bucket. When users flag nodes, they go to a f …
aharown07's user avatar
  • 414
0 votes
2 answers
434 views

Display a pager on the top and bottom of view pages but only on the bottom of view blocks

I have it working on pages by an edit to a custom views-view.html.twig in the theme (using the full pager option in the Views display). … I think I need a little conditional logic in the views-view.html.twig template to check for if … is full pager versus if … is mini pager, or if … is page vs. if … is block. How can I achieve that? …
aharown07's user avatar
  • 414
0 votes

How can I use contextual filters to display a block with field values from a single related ...

Settings to get the current node filtered into a sidebar Views block: Provide default value: enabled Type: "Content ID from URL" Save the View. …
aharown07's user avatar
  • 414
0 votes
2 answers
2k views

How can I use contextual filters to display a block with field values from a single related ...

I've found various recipes/threads with the scenario where have a content type A node and want to display in a sidebar block, all the related content type B nodes, with the relationship based on an en …
aharown07's user avatar
  • 414