This sounds strange, but could we please have the view title available as a field, or a token? I can explain the odd use case for this, but the answer will probably be "use hook_views_pre_render()" etc. I am trying to use that hook however the title is being overridden by panels and $view->get_title() doesn't return the overridden title :(

Comments

merlinofchaos’s picture

Oh hm. That doesn't sound strange actually.

Here's a question -- is there a view title token that you can use?

mstrelan’s picture

No. I had a look in the code, it seems it builds available tokens from fields added to the view and loops through the arguments, but that's it. I started writing a patch to add [view_title] or similar after adding the argument tokens, but that's where I ran in to my second problem, where panels overriding the title is not reflected by $view->get_title().

Shall I continue with the patch for a view title token, or would a global field be better, i.e. to make it more generic and reusable?