Score:0

Show field in a Views row as selected in the option for a custom Views Formatter

za flag

I have created a custom Views formatter to make an accordion. Each accordion item is a row. I added a custom field for the user to select which field would be used for the title of the accordion item.

Inside {% for row in rows %} how can I get the value of the field chosen in the options? I thought maybe {{ row.accordion_item_title }} would work, but it does not.

I have seen Theming Views in Drupal 8 – Custom Style Plugins, which includes a field to select a field, but in this case, the field values are rendered outside of {% for row in rows %}.

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.