2

I have a content type which has field_section of type Taxonomy term.

Views

I created a View pane with contextual filters set to field_section. It means that the view pane should show all nodes which have field_section set to a specified value. It works when manually setting the section in Views preview, e.g. to 39.

enter image description here

enter image description here

In the Views contextual filter settings, in the section "WHEN THE FILTER VALUE IS NOT AVAILABLE", it says "This display does not have a source for contextual filters, so no contextual filter value will be available unless you select 'Provide default'." But what default value to choose? All values with "url" are no good, because there is nothing in the url.

Panels

I created a Panel Page for the home page. The page address is like http://example.com. I added the View pane.

In the Panel page, View pane settings there are no settings at all:

enter image description here

I've added a context and a relationship to the Panel page (not sure if relationship is necessary):

enter image description here

Previously, I've been passing page arguments to view panes by configuring the "Argument input" setting in Views, and it was working. But in this case, there are no page arguments. I want to pass a specific term ID tid=39 to the view pane and don't know how.

1 Answer 1

5

1) Views -> Contextual filter: add a filter

enter image description here

2) Views -> Pane settings -> Argument input: choose "Input on pane config" (notice the label)

enter image description here

3) Panel page -> Content: add the View pane

4) Panel page -> Content: in the pane settings, set the argument (notice the same label)

enter image description here

5) For this scenario, the Panel page -> Context is not needed

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.