Score:0

Access field from current page in block or view

do flag

I have a custom content type. (d9)

I need to access some fields from the current page in a sidebar area. Essentially I need to make a "get more info about "field from current page" here (with a link)" in a small sidebar widget.

I am not sure how to do this.

I have tried creating a custom block type but cannot find a way to access fields on the current node. (Could I do something cheesy and access them in the twig template for the block?)

I have also tried creating a view. This I can make grab the correct fields but I don't seem to understand how to access the context of the current node rather than say, all the nodes of the type. (Is there a way to filter for only the current page?)

No Sssweat avatar
ua flag
`Is there a way to filter for only the current page?` yes, just [do this](https://blog.42mate.com/wp-content/uploads/2021/04/current_node.png).
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.