Score:0

How to add Views total rows count in page title?

gu flag

I want to add the total rows count in my page title (not the view title).

Tried using the metatag module for that, but instead of [view:total-rows] token, which is shown as supported for the title field, I get 0 (zero).

I was able to change the view title through hook_views_pre_render(ViewExecutable $view), but this didn't change the page title. Moreover, I want them to be separated: page title != view title.

Is it possible to pass rows count in the page title?

Here is what I'm trying to achieve:

  • Page title (meta): 12345 things in our great list in 2021
  • View title: Out great list of some things

Year also has to be dynamic.

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.